I’ve created a small script to test creating my own help based powershell and i received error:
Get-Help : Cannot find Help for topic “.\testHelp.ps1”. At line:49
char:15
+ Get-Help <<<< @PSBoundParameters | more
+ CategoryInfo : ResourceUnavailable: (:) [Get-Help], HelpNotFoundException
+ FullyQualifiedErrorId : HelpNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
Heres the test script:
<#
SYNOPSIS
retrieive a list of services from local and remote machines
.DESCRIPTION
Retrieive services from local and remote machines and reports the following fields
.PARAMETER Servers
The Get-Service cmdlet gets objects that represent the services on a local computer or on a remote computer.
.EXAMPLE
PS C:\> Get-Something 'One value' 32
#>
param($computername="localhost")
Get-WmiObject -Class Win32_BIOS -ComputerName $computername
Looks like you’re missing the
.in front of.SYNOPSIS. Also your help says the parameter is calledServersbut the param block says$computername. PowerShell is pretty finicky about the help formatting being just right although I don’t think it validates parameter names. 🙂The result is: