At the recent PowerShell Summit I presented a session on adding graphical elements to your script without the need for WinForms or WPF. One of the items I demonstrated is a graphical popup that can either require the user to click a button or automatically...
< # .SYNOPSIS This script opens a word document using PowerShell .DESCRIPTION This script re-implments a simple MSDN script to open a word document using VBA. IT Pros using PowerShell might...
<# .SYNOPSIS This script creates a scheduled task object. .DESCRIPTION This script re-implements an MSDN sample using PowerShell .NOTES File Name : New-Task.ps1 Author ...
< # .SYNOPSIS This script adds a program to the firewall. .DESCRIPTION This script used the firewall com object to add a new application to the firewall. .NOTES ...
< # .SYNOPSIS This script Enables ICMP on the Standard Firewall profile. .DESCRIPTION This script creates a Firewall object then configures it. .NOTES File Name : Enable-ICMP.ps1 ...
< # .SYNOPSIS This script creates a rule in the Windows Host Firewall. .DESCRIPTION This script creates a new firewall rule for port 80 over tcp (i.e. 80). .NOTES File Name ...
< # .SYNOPSIS This script enables then disables the SMTP port on a local system .DESCRIPTION This script first creates a FW object, then creates a port. The script then addes that port to the firewall rules...
< # .SYNOPSIS This script displays the CA roles of the caller .DESCRIPTION This script instantiates the CA COM object, gets the allowed roles, and displays them. This script also shows...
In a post yesterday, I looked at telling the difference between a scalar and arrays. The difference matters when working with PowerShell – a scalar has properties and methods, while an array has members that have properties and methods. You can directly...
Over on Hal Rotettenberg’s blog ( TechProsaic ), he recently posted an interesting article about how to tell if an object in PowerShell is an array or a scalar. His solution was to use the Get-Type method, and to look for the BaseType property of the...
# Get-FileCount.ps1 # Uses shell.application to get a count of files in a folder # Thomas Lee - tfl@psp.co.uk # First get shell object $Shell = new-object -com Shell.Application # Now get folder details and item counts for a folder $foldername =...