I have created some custom PowerShell Cmdlets in C# and would like to provide some information to be displayed using the get-help cmdlet; e.g. "get-help my-cmdlet".
I have created a basic snapin deriving from PSSnapIn and overridden the Description, Name and Vendor properties. I have also created my help file "Cmdlets.dll-Help.xml". Cmdlets.dll is the correct name of the assembly as instructed here.
I created the following script to quickly test this help out:
$ErrorActionPreference = "Stop"
$scriptFolder = Split-Path $script:MyInvocation.MyCommand.Path
$dll = ($scriptFolder + "\Release\x64\Cmdlets.dll")
Write-Host "Testing Cmdlets in $dll" -fore Green
[System.Reflection.Assembly] $assembly = [System.Reflection.Assembly]::LoadFrom($dll)
Import-Module -assembly $assembly
get-help get-latestfiles
This seems to just turn up some default help about the cmdlet parameters but fails to get any of my examples I have written in the XML file. Does anyone have any thoughts on why this is?