PowerShell Get-Help and Update-Help

As a lot of system, database and network administrators are transitioning from VBScript to PowerShell or learning PowerShell to automate administration tasks for the first time, it is common to run into a new or unfamiliar PowerShell cmdlets that may be useful in your tasks. Get-Help cmdlets could be one of the most effective learning assistant.

There are multiple sources you can get information on PowerShell cmdlets properties, functionalities and even examples. Microsoft TechNet provides abundant information of its usage. For example for Add-Member Cmdlet. This Microsoft TechNet page provides details of its properties, methods as well as examples. Another way of getting this information is using Get-Help cmdlet. 

Using Get-Help PowerShell cmdlet display all this information about the cmdlet you are interesting right at the PowerShell window without going to the website. Like the example above, we could use 

Get-Help Add-Member

to find out all the details about Add-Member cmdlet.

However, if you have been using older version of PowerShell or trying to find details on a newer cmdlet, you may encounter message that Get-Help cannot find the help files for this cmdlet on this computer.


All you need to do is execute a

Update-Help

PowerShell command and it will download all necessary files in the background.


Execute the Get-Help command again and you would see the all the details on Add-Member. If you notice, the above screen shot has a -Examples property for Get-Help cmdlet. This lists out examples of using Add-Member. I found this feature very useful.

You may also see I use 'help' instead of 'Get-Help' as the command. 'help' is the alias of 'Get-Help' and make scripting simpler. You can find a list of alias with

Get-Alias

Funny thing is 'help' is not included in the alias list.. but you get the idea.

Now you know about Get-Help PowerShell cmdlet, hopefully it could be a great assistance for your PowerShell learning and scripting.

Google+