As I promised yesterday, here are a few tips and tricks for
help files based on cmdlets.
As you invest more heavily into PowerShell and you read the
help files, you may get to the point that you will realize which cmdlet to use
and what the parameter is you need, but you cannot remember how to use the
parameter. Get-Help can focus on the specific parameter of a cmdlet.
Get-Help Stop-Process
–Parameter ID
PS C:\> Get-Help Stop-Process –Parameter ID
-Id
Specifies the process IDs of the processes
to be stopped. To specify multiple IDs, use commas to separate the IDs. To find
the PID of a process, type
"get-process". The parameter name
("Id") is optional.
Required? true
Position? 1
Default value none
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false
This displays the full help file for the –ID parameter of Stop-Process. If you just want the parameter section of the
help file type:
Get-Help Stop-Process
–Parameter *
If you want just the examples:
Get-Help Stop-Process
–Examples
If you would like to keep multiple help files open in a
searchable window, try this:
Get-Help Stop-Process
–ShowWindow
Also, if you prefer and online help file in a web browser:
Get-Help Stop-Process
–Online
This is it for help on cmdlets. Tomorrow we will look at more ways to use
Get-Help
Comments