I could use a good explanation of PowerShell Documentation Syntax:

> man Update-Help

    Update-Help [[-Module] <string[]>] [[-SourcePath] <string[]>] [[-UICulture] <cultureinfo[]>] [-Recurse] [-Credential <pscredential>] [-UseDefaultCredentials] 
    [-Force]  [<CommonParameters>]

    Update-Help [[-Module] <string[]>] [[-UICulture] <cultureinfo[]>] [-LiteralPath <string[]>] [-Recurse] [-Credential <pscredential>] [-UseDefaultCredentials] 
    [-Force]  [<CommonParameters>]

So I tried to update the man:

> Update-Help Get-ChildItem


Update-Help : No Windows PowerShell modules were found that match the following pattern: Get-ChildItem. Verify the pattern and then try the command again.At line:1 
+ Update-Help Get-ChildItem
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidArgument: (Get-ChildItem:String) [Update-Help], Exception
    + FullyQualifiedErrorId : ModuleNotFound,Microsoft.PowerShell.Commands.UpdateHelpCommand

In particular I want to know what parameters are compulsory, what is the type of those parameters and do they need to come in a specific order?


man Update-Help

First keep in mind that man (really Get-Help) will not show you the full help that is available for the commandlet by default. The basic output, simply doesn't give you what you need in an easy to read way.

If you use the Get-Help Update-Help -online or Get-Help Update-Help -ShowWindow you will get a lot more detail. One bit of information is a listing of each parameter, their position (if they can be used without the -param), if it is mandatory, the default value, and so on.

You can also get details about a specific parameter directly using a something like Get-Help update-help -Parameter module.

The really useful part of Get-Help in my opinion is the examples section. get-help update-help -Examples. This will typically give you a bunch of examples of how to use the commandlet.

Since all the powershell docs are online, you can usually just do a Google/Bing search like powershell update-help to get a link to the online documentation which is complete, and a bit easier to read in my opinion.

Update-Help Get-ChildItem

This failed because Get-ChildItem is a commandlet, not a module. You could simply do Update-Help with no paramaters and it would update everything. Or you could find the module that Get-ChildItem is a member of, and update that module.

PS C:\users\public> get-command get-childitem

CommandType Name          Version Source
----------- ----          ------- ------
Cmdlet      Get-ChildItem Microsoft.PowerShell.Management

PS C:\users\public> Update-Help -Module Microsoft.PowerShell.Management
PS C:\users\public> 
  • 1
    Another handy switch is -full. Eg Get-Help Update-Help -full | more – root Sep 28 '16 at 20:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.