So I've written a few functions to streamline my common tasks, and have tried documenting them with relatively proper Get-Help
info. However it does not display.
I have the funtions in my $profile
, is that the problem?
Here's one of my functions, I've tried matching about_Comment_Based_Help:
Function Service-Restarter ($service, $vm){
<#
.SYNOPSIS
Restart [redacted] services running on client/server.
.DESCRIPTION
Using the windows "Services" tool to connect to other clients/servers is very slow.
This function quickly restarts the [redacted] services running on a client/server.
.EXAMPLE
Service-Restarter service* Computer-Name-Here
.ALIAS
srestart
#>
Restart-Service -InputObject $(Get-Service -ComputerName $vm -Name $service)
}
Set-Alias srestart Service-Restarter
This is what Get-Help
returns:
[41]PS:>help srestart -full
NAME
Service-Restarter
SYNTAX
Service-Restarter [[-service] <Object>] [[-vm] <Object>]
PARAMETERS
-service <Object>
Required? false
Position? 0
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
-vm <Object>
Required? false
Position? 1
Accept pipeline input? false
Parameter set name (All)
Aliases None
Dynamic? false
INPUTS
None
OUTPUTS
System.Object
ALIASES
srestart
REMARKS
None
And here is what a general search displays:
[45]PS:>help restart Name Category Module Synopsis ---- -------- ------ -------- Service-Restarter Function ... Restart-Computer Cmdlet Microsoft.PowerShell.M... Restarts ("reboots") the operating system on local and remote computers. Restart-Service Cmdlet Microsoft.PowerShell.M... Stops and then starts one or more services.