My Powershell Function Help does not display

Whilst attempting to add help information to one of my functions this morning, using the new V2 features which allows you to add multi line information, in the same format as builtin cmdlets each time I tested the function the help did not output my custom text . Example:

help Set-VMHostMultipathToRoundRobin

NAME
    Set-VMHostMultipathToRoundRobin

SYNOPSIS


SYNTAX
    Set-VMHostMultipathToRoundRobin [<CommonParameters>]


DESCRIPTION


RELATED LINKS

REMARKS
    To see the examples, type: "get-help Set-VMHostMultipathToRoundRobin -examples".
    For more information, type: "get-help Set-VMHostMultipathToRoundRobin -detailed".
    For technical information, type: "get-help Set-VMHostMultipathToRoundRobin -full".

This just wasn’t working for me and couldn’t work out why, I am using V2. So what was going on? As the title of post implies, I had tabs instead of space leading up to the text. As soon as I replaced the tabs with space it all worked. Just a small gotcha. Below is my example help text:

<#
   .SYNOPSIS 
      Sets all LUNs attached to the VMHost to user Round Robin Multipathing
   .DESCRIPTION 
      More text to describe in more detail the function if required
   .PARAMETER VMHost
      The VMHost (ESX Server) on which to change the LUN Multipathing
   .NOTES 
      Author:  Herschelle42
   .EXAMPLE 
      Set-VMHostMultipathToRoundRobin (Get-VMHost -name MyESX1)
#> 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.