The syntax section lists each of the possible combinations of parameters a command will accept; each of these is known as a parameter set.
A command that has more than one parameter set is displayed as follows:
SYNTAX
Get-Process [[-Name] <String[]>] [-ComputerName <String[]>]
[-FileVersionInfo] [-Module] [<CommonParameters>]
Get-Process [-ComputerName [<String[]>]] [-FileVersionInfo]
[-Module] -InputObject <Process[]> [<CommonParameters>]
The syntax elements written in square brackets are optional; for example, syntax help for Get-Process shows that all of its parameters are optional, as shown in the following code:
SYNTAX
Get-Process [[-Name] <String[]>] [-ComputerName <String[]>] [-FileVersionInfo] [-Module] [<CommonParameters>]
Get-Process may be run without any parameters at all, or it may be run with a value only and no parameter name, or it may include the parameter name as well as the value. Each of the following examples is a valid use of Get-Process:
Get-Process Get-Process powershell Get-Process -Name powershell
Later in this chapter, we will take a more detailed look at the different parameters and how they might be used.