- Pip install Boto3 - Thu, Mar 24 2022
- Install Boto3 (AWS SDK for Python) in Visual Studio Code (VS Code) on Windows - Wed, Feb 23 2022
- Automatically mount an NVMe EBS volume in an EC2 Linux instance using fstab - Mon, Feb 21 2022
Whether you are a PowerShell newbie or guru, you’ll always need PowerShell help because nobody can remember hundreds of cmdlets and their countless parameters. On a freshly installed Windows, PowerShell help only offers limited information. If you don’t have the complete help files, you will see the notice “Get-Help cannot find the Help files for this cmdlet on this computer” under REMARKS when you display the help of a cmdlet.
Get-Help Get-Host - Before Update-Help
Update-Help ^
To install the complete help files, you can run the Update-Help cmdlet at an elevated PowerShell prompt. If you run Update-Help on a PowerShell console without admin privileges, you will receive the error message “Failed to update Help for the module(s)…” If you are in PowerShell ISE, you just have to click “Update Windows PowerShell Help” in the Help menu.
Update Windows PowerShell Help
PowerShell will then connect to the Internet and download the latest PowerShell help files.
Updating Help in PowerShell ISE
It doesn’t make a difference whether you update PowerShell help in the PowerShell console or in PowerShell ISE. The help files are the same and are stored in C:\Windows\System32\WindowsPowerShell\v1.0\en-US.
Get-Help ^
After the update, you should see additional information under REMARKS.
Get-Help Get-Host - After Update-Help
What I like most about PowerShell help are the examples. In most cases, the example will reveal the syntax of a cmdlet much faster than the description. Even more interesting are examples that show you what cool things you can do with a cmdlet. You can display the examples with the -Examples parameter. The examples will only be available after you update PowerShell help.
Get-Help Get-Host -Examples
To view the complete help file, you have to use the -Full parameter:
Get-Help Get-Host -Full
You can also use Get-Help with wildcards to find a cmdlet if you are unsure about its name. For instance:
Get-Help *string
It can’t be wrong to run Get-Update every once in a while to check for updates of the help files.
Save-Help ^
If you have computers without Internet access or that are behind a firewall, you can download help files with the Save-Help cmdlet and update the clients through a network share.
Save-Help -DestinationPath C:\tmp
To update your PowerShell from a local folder, just type:
Update-Help -SourcePath C:\tmp
Help in PowerShell ISE ^
I pretty much convinced myself about the GUI version of PowerShell when I wrote the article 10 reasons for using PowerShell ISE instead of the PowerShell console. One reason I forgot to mention is the better integration of the help files. You can access them in the command pane on the left side. If you closed the command pane, you can open it through the View menu.
PowerShell ISE - Show Command Add-on
To search for a cmdlet, just start typing in the Name field. Once your cmdlet is displayed, you have to select it and then click the blue question mark. A nice feature of PowerShell ISE help is the search feature, which highlights hits in the help text.
Help in PowerShell ISE
But PowerShell ISE can do even more than just show you the syntax of a cmdlet. It allows you to insert parameters in your commands. In the example below, I added the -ComputerName parameter to the Get-Process cmdlet and inserted it in the PowerShell prompt.
PowerShell ISE - Insert
You can also directly run the command or copy it to the Windows clipboard.
PowerShell about_ topics ^
In addition to the help files of cmdlets, PowerShell help comes with various interesting topics that begin with about_. For instance, there is an about help file that describes regular expressions and one that describes wildcards. To display them all, type Get-Help about_*.
Get-Help about_*
If you are looking for a specific topic, say comparison operators, you can easily find it by using wildcards.
Get-Help about_Comp*
Online help ^
If you prefer to read the help file in your web browser, type:
Get-Help Get-Host -Online
The command will open your default browser with the latest help file.
Get-Help –Online
Get-Help, Update-Help, and Save-Help offer quite a few additional parameters. I think you know now how to get help about them.
And what about removing help files? When I am sure that they won't be needed and I would save 400MB?
Thanks.
R.H.