by Peter-Kriegel at 2012-12-07 01:38:04
Hi!by Peter-Kriegel at 2012-12-07 01:45:41
I like to document my Functions with Comment based help!
Every time i Use .EXAMPLE the Help is not showed!
is that a Bug!? how to solve or workaround!?Function Foo {
<#
.SYNOPSIS
This Function is without sense
.DESCRIPTION
This Function is without sense. The answer is 42!
.PARAMETER Bar
Parameter where you can order beer!
.EXAMPLE 1
PS C:> Foo -Bar 'Guinness'
The Example shows hot to order Guinness beer from the Bartender
.NOTES
Author: Peter Kriegel http://www.admin-source.de
#>
param (
[String]$Bar = ''
)
Process {
"Drink to much $Bar"
}
}
Get-Help Foo -full
If i remove the .EXAMPLE section the Help is showing proper!
Have it!
The fault was the Number after the EXAMPLE!
This works fine:Function Foo {
<#
.SYNOPSIS
This Function is without sense
.DESCRIPTION
This Function is without sense. The answer is 42!
.PARAMETER Bar
Parameter where you can order beer!
.EXAMPLE
PS C:> Foo -Bar 'Guinness'
The Example shows hot to order Guinness beer from the Bartender
.NOTES
Author: Peter Kriegel <!-- m –><a class="postlink" href="http://www.admin-source.de">http://www.admin-source.de</a><!-- m –>
#>
param (
[String]$Bar = ''
)
Process {
"Drink to much $Bar"
}
}
Get-Help Foo -full