Sunday, July 3, 2011

Powershell made easy

The easiest way to learn powershell
If you remeber the two commandlets "Get-Help" and "Get-Command" your hand book for powershell is ready.

1. Open commandprompt Start-->Run-->cmd -->Press enter Key
2. Type in powershell and click enter, if the command prompt invokes powershell without returning any error which means that you have powershell installed, otherwise install powershell preferable Windows Powershell 2.0 refer http://support.microsoft.com/kb/968930/en-us
3. Now to learn any powershell comand let type in "Get-help > -detailed, this will give the entire detail of the given powershell command including example.
Eg: Get-Help Get-Process -detailed
4. How to know the existing powershell command lets? here is the simple way if you know the module. Type in Get-help Get-Command -full, this will return all the possible help for Get-Command for you retrieve the command. Get-Command is a cmdlet by itself
Eg: Get-Command -CommandType All --> will list all the existing commands for powershell.
Two Powershell cmdlets -- Get-Help & Get-Command.

Rule the world of powershell!!!
Happy powershell scripting