May 17th, 2014

PowerTip: Use Comment-Based Help in Shared Scripts

Doctor Scripto
Scripter

Summary: Learn how to leverage Windows PowerShell comment-based Help.

Hey, Scripting Guy! Question How can I make my scripts easier to use when I share them with friends or colleagues?

Hey, Scripting Guy! Answer People do not need to open and analyze your script if you use the comment-based Help capabilities
          of Windows PowerShell
. You can provide a description, explain the use of parameters, and provide
          a number of examples of script execution.

          Use the Get-Help cmdlet to access comment-based Help, use the name of your script, and choose
          from a number of optional switches:

Get-Help .\YourScriptName.PS1 [–Detailed –Full –Examples –Parameter <String>]

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback