Over the course of the years I have been asked about this new thing call PowerShell (.ps1). It not that new anymore and there are a number of different applications and administrative task that now using PowerShell as their standard command line interrupter. To get start with PowerShell I would suggest reviewing the following links as a good base and reference:
One of my favorite free tools when working with PowerShell is PowerGUI . The PowerGUI has good information to get started in the help files as well. There is a plug-in for Visual Studio (VS) located here http://powerguivsx.codeplex.com/ to work in the VS IDE. Which make is easier to check-in your PowerShell scripts into source control as we know we all should do. Some of the features that the VS plugin and the PowerGUI has are:
One other item that trip everyone up when trying to run a .ps1 script for the first time is the execution policy. By default the execution policy is set to Restricted. Below are the four execution policies that govern scripting in Windows PowerShell:
You can find out what the execution policy is for your local workstation or server by the following:
To set the execution policy to run the a PowerShell script you will need to run the following command as a administrator:
Having the Unrestricted Execution Policy might be the easiest why to get your script running, but it might not be the more secure method. For more information on execution policy can be found here and here. You can also find out by using the PowerShell help
If you want to see all of the help items you can add the –full For example: Get-Help –full Set-ExecutionPolicy.
As you might have notice you can get help on any of the PowerShell cmdlet by typing in GET-Help [cmdlet] like in this example or by using the Get-Help about-[topics] For example: GET-Help about_alias or Get-Help about_Arrays. More on About Help Topics can be found here.
For more information regarding all of the commands can be found here and here
PowerShell is a very powerful script tool that is for build and deployment and a number of everyday administrative, development and testing tasks. Getting to know how to use PowerShell will be a great addition to anyone knowledge toolbox.
Happy PowerShell scripting





