开发者

How do I use .PARAMETER when writing PowerShell help?

开发者 https://www.devze.com 2023-04-04 00:22 出处:网络
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 \".PARAM

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 开发者_StackOverflow中文版know how this works?

.EXAMPLE

Example code 

.NOTES

This is awesome!

.LINK

http://winfred.com
#>


Its not complicated, you simply use it as:

.PARAMETER NameOfParam
    Description of param

For example:

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

精彩评论

暂无评论...
验证码 换一张
取 消