What is required for Powershell 2.0 to render a script's default parameter value in the help page? -


i have following simple script accepts text input , writes host.

<# .synopsis     writes input string host. .parameter text     text write host. #>  param([string]$text = "hello world!") write-host $text 

to render script, execute following command within powershell session, write-text.ps1 name of script.

get-help .\write-text.ps1 -full 

in following output, expecting see default value of script's parameter listed in -- don't:

parameters     -text <string>         text write host.          required?                    false         position?                    1         default value         accept pipeline input?       false         accept wildcard characters? 

what need add or change in script help-engine render default parameter value?

you can not show default value using comment based help. need make maml file that.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -