Bug in comment based Help with Functions

by Peter-Kriegel at 2012-12-07 01:38:04

Hi!

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:&gt; 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!
by Peter-Kriegel at 2012-12-07 01:45:41
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:&gt; 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