- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to use PowerShell Help commands?
To get help for the particular command, you can use Get-Help (alias: help) cmdlet with the command that you need help.
Once you run this command, you will get the description of NAME, SYNOPSIS, SYNTAX, DESCRIPTION, RELATED LINKS, and REMARKS.
Multiple parameters that support help as shown below
-Full − Detailed help with parameter explanation and examples.
help Get-Service -Full
-Detailed − Detailed help of parameters and doesn’t include the examples.
help Get-Service -Detailed
-Examples − Only help related to examples will be displayed on the PowerShell screen.
help Get-Service -Examples
-Online − Help contents for the cmdlet will be searched online on the Microsoft website.
help Get-Service -Online
When you install or update PowerShell version or install a new operating system that comes with the PowerShell installed then you need to make sure to update the help content from Microsoft website and that can be done using Update-Help command and that is recommended once in a month because some help contents get outdated and MS continuously updates their help content.
Some help for cmdlets is not visible if the outdated help resides in your system at that time you need to update the help content.
When -ShowWindow parameter is specified, help will be displayed in the separate window for that specific command. For example,
help Get-Service -ShowWindow
Here, in the Settings button, there are options to filter out specific items.
If you need any specific section(s) related help the select that setting(s).
If you need help with the parameters in command line then use -Parameter and command name. For example,
help Get-Service -Parameter ComputerName
PS C:\Users\Chirag.Nagarekar> help Get-Service -Parameter ComputerName -ComputerName <System.String> Gets the services running on the specified computers. The default is the local computer. Type the NetBIOS name, an IP address, or a fully qualified domain name (FQDN) of a remote computer. To specify the local computer, type the computer name, a dot (.), or localhost. This parameter does not rely on Windows PowerShell remoting. You can use the ComputerName parameter of Get-Service even if your computer is not configured to run remote commands. Required? false Position? named Default value None Accept pipeline input? True (ByPropertyName) Accept wildcard characters? false
If you need to display all the parameters then use * instead of the parameter name.
help Get-Service -Parameter *
Similarly, if you need help related to only example sections in command line then use -Examples in command.
help Get-Service -Examples
- How to run PowerShell commands in Background?
- How to run PowerShell commands from the command prompt?
- How to add help in the PowerShell function?
- How to write comment based Help in PowerShell?
- How to use PowerShell as a Calculator? Or How to use PowerShell for arithmetic operations?
- How to use stopwatch in PowerShell?
- How to get the list of all the commands available in the PowerShell?
- How to use Measure-Object in PowerShell?
- How to use function Alias in PowerShell?
- How to use a transcript in PowerShell?
- How to use Compare-Object in PowerShell?
- How to use Hashtable splatting in PowerShell?
- How to use Array Splatting in PowerShell?
- How to use Wait-Process in Powershell?
- How to use PowerShell Break with the Label.