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

PowerTip: Display Every PowerShell Example in Help

$
0
0

Summary: Display every Windows PowerShell example that Help contains.

Hey, Scripting Guy! Question How can I use Windows PowerShell to display every Help example that Windows PowerShell contains?

Hey, Scripting Guy! Answer Use Get-Command to retrieve all of the cmdlet names, pipe the output to Foreach-Object,
           and call Get-Help with the –Example switch, for example:

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

Note  GCM is an alias for Get-Command and % is an alias for Foreach-Object.


Viewing all articles
Browse latest Browse all 3333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>