PowerTip: Use Comment-Based Help in Shared Scripts


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>]

Comments (2)

  1. Great post. Thank you.

  2. Graeme Bray says:

    To do this super easy, in ISE Hit Ctrl+J and input an advanced function.

    Snippets are awesome, saves a bunch of typing.

Skip to main content