Quantcast
Channel: Hey, Scripting Guy! Blog
Viewing all articles
Browse latest Browse all 3333

PowerTip: Use PowerShell to Display Help for Module Cmdlets

$
0
0

Summary: Use Windows PowerShell to display all Help for all cmdlets in a module.

Hey, Scripting Guy! Question How can I see all of the Help examples for cmdlets from a specific module?

Hey, Scripting Guy! Answer After you have updated your Help in Windows PowerShell 3.0, use the Get-Command cmdlet to retrieve all cmdlets from a specific module, pipe the results to the Foreach-Object cmdlet, and use the Get-Help cmdlet inside the script block. Following is an example for the PrintManagement module:

Get-Command -Module PrintManagement| Foreach-Object {get-help $_.name -Examples}

Here is a shorter version of the same command:

gcm -mo *print* | % {get-help $_.name -ex}


Viewing all articles
Browse latest Browse all 3333

Trending Articles