Winfred
Winfred

Reputation: 966

How do I use .PARAMETER when writing PowerShell help?

How do I use the .PARAMETER option to add detailed information for the parameters of a function when writing the help for it? I tried ".PARAMETER $ParamName", that didn't work, and I tried ".PARAMETER -ParamName", that didn't work either.

Here's an example:

<#

.SYNOPSIS
short overview

.DESCRIPTION

longer overview

.PARAMETER

dont know how this works?

.EXAMPLE

Example code 

.NOTES

This is awesome!

.LINK

http://winfred.com
#>

Upvotes: 3

Views: 2079

Answers (1)

Anders Zommarin
Anders Zommarin

Reputation: 7274

Its not complicated, you simply use it as:

.PARAMETER NameOfParam
    Description of param

For example:

.PARAMETER MyParam
    MyParam does whatever bla bla bla...

Upvotes: 4

Related Questions