The Update-Help cmdlet

Coding help and tutorials for Batch, PowerShell are here!

Moderators: FreeBooter, Dr Jay

User avatar
Site Owner
Site Owner
Posts: 976
Status: Offline

#1 The Update-Help cmdlet

Unread post#1 » Tue May 02, 2017 4:46 pm

The Update-Help cmdlet

One of the first commands to run when opening Windows PowerShell for the first time is the Update-Help cmdlet. This is because Windows PowerShell does not ship help files with the product. The Update-Help cmdlet downloads the newest help files for Windows PowerShell modules and installs them on your computer. You can use the Get-Help cmdlet to view the new help files immediately. This feature enables you to install help files for modules that do not include them and to update help files on your computer so that they never become obsolete.

The modular nature of Windows PowerShell requires additional consideration when updating help. Simply running Update-Help does not update all of the modules loaded on a particular system. In fact, some modules may not support updatable help at all—these generate an error when you attempt to update help. The easiest way to ensure you update all possible help is to use both the module parameter and the force switched parameter. The command to update help for all installed modules (that support updatable help) is shown here:

Code: Select all

Update-Help -Module * -Force


Errors appear when attempting to update help files that do not support updatable help. One way to update help and not to receive a screen full of error messages is to run the Update-Help cmdlet and suppress the errors all together.

Code: Select all

Update-Help -Module * -Force -ea 0

The problem with this approach is that you can never be certain that you have actually received updated help for everything you wanted to update.

Was this tutorial helpful to you? :feedback:

Hide post links
Show post links

Return to “Batch, PowerShell Scripting Language”

Who is online

Users browsing this forum: No registered users and 1 guest