PowerTip: Get PowerShell Printer Examples

Summary: Learn how to get only printer examples that are related to Windows PowerShell.

Hey, Scripting Guy! Question How can I quickly and easily see only examples of Windows PowerShell commands that are related to printing
          in Help?

Hey, Scripting Guy! Answer Use the Get-Command cmdlet, then pipe the results to the Foreach-Object cmdlet and call Get-Help:

Get-Command -Noun printer* | Foreach-Object {get-help $_.name -ex} | more

Comments (2)

  1. Yaniv says:

    Genius, so simple but somehow I’ve never thought of using Foreach loop to get all the relevant help

    Thanks Scripting Guy

Skip to main content