How To Use PowerShell Help System Effectively

The PowerShell help system is the most useful thing that you ever need to use PowerShell effectively. Since PowerShell is a shell with no graphical interface, you won’t see any fancy button or menu. Instead, you have to enter the commands in order to see the results. This is where the help system comes in handy as it guides the user to complete the commands he wants or even search for the commands to get your work done.

Windows 8 comes with the latest version of PowerShell 3. It contains all the features of PowerShell 2 plus a host of enhancements and additional features. Fortunately, Microsoft has kept both the versions of PowerShell in Windows 8 meaning that the user can run whichever version he likes. By default, if you go to “Run -> powershell.exe”, this will open PowerShell 3. If you want to open PowerShell 2, run the command with the following syntax:

powershell.exe -version 2.0

Run powershell version 2

The first thing you should do is to run PowerShell as administrator. This is to make sure that you can update the PS help system. In Windows 8, go to Search (Windows Key + Q) and search for “PowerShell”. In the search results, right click “PowerShell” and select “run as administrator”.

Start Powershell as admin

The best way to see if you are running PowerShell as administrator is that the title of the PowerShell window starts from “Administrator”.

powershell with admin title

PowerShell does not come with help system pre-installed. You need to install it using an update command. To update the help system to the latest one, issue the following command:

update-help

If you are running this command for the first time, it will take some time to scan for changes and updates.

powershell update help system

You can also download the update file on your computer and then install it on multiple computers in offline mode. For this, you can use the following command:

save-help [destination path]

For installing the latest update file on an offline computer, you can use the following command:

update-help -SourcePath [source path]

The “update-help” command updates the help system every 24 hours. This means that if you run the “update-help” command multiple times in a day, it will simply run the first time and will do nothing for the next 24 hours.

For getting help for each command, you may use the following syntax:

powershell help

help command-name

For example,

help update-help

This will give you information about the command syntax, its synopsis and detailed description on how and when to use the command.

The best thing about using help in PowerShell is that the user gets almost every kind of help needed to run a particular command. If you need real life examples about how the command is used, you may use the following syntax:

help update-help -examples

For detailed information, you can use the -detailed switch instead of -examples. And for complete information, you can use -full switch.

Most of the times, users tend to read the help files while they are working on the PowerShell. You can open a new window of the same help file by using the following command:

powershell show help window

help update-help -ShowWindow

This will pop up a new graphical window with all the help in it. You can use the help along side the PowerShell window.

Most of the people keep on using Google for finding examples of how to use commands in PowerShell. Now that we have learnt how to use the help system to take actual help from PowerShell help, PowerShell does not leave us alone even if we want to go online for help.

powershell help online error

To go online for help, run the following command:

help update-help -online

This will take you to the PowerShell documentation site where you will be able to get all kinds of information about all PowerShell commands. Sometimes if you have a default browser other than Internet Explorer, the above command will give an error message. In this case, you can visit the PowerShell documentation directly.

After reading this article, I hope that you will be more comfortable using PowerShell. How do you use help or shortcuts in PowerShell?