PowerTip: Get PowerShell Printer Examples

PowerTip: Get PowerShell Printer Examples

  • Comments 2
  • Likes

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

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Genius, so simple but somehow I've never thought of using Foreach loop to get all the relevant help

    Thanks Scripting Guy