Command Help
Command Help
Command Help
Both the following examples are correct uses of the New-Alias cmdlet:
New-Alias -Name utd -Value Update-TypeData
New-Alias -Name utd -Value Update-TypeData -Scope global
A parameter name can be optional even if the value for that parameter is
required. This is indicated in the syntax by the brackets around the
parameter name but not the parameter type, as in this example from the
New-Alias cmdlet:
[-Name] <string> [-Value] <string>
The following commands correctly use the New-Alias cmdlet. The commands
produce the same result:
New-Alias -Name utd -Value Update-TypeData
New-Alias -Name utd Update-TypeData
New-Alias utd -Value Update-TypeData
New-Alias utd Update-TypeData
This cmdlet requires values for both the Name and Value parameters.
Array Arguments
Brackets are also used in syntax descriptions to represent an array.
The following example shows the syntax for the Restart-Service cmdlet:
Restart-Service [-Name] <string[]> [-Include <string[]>]
[-Exclude <string[]>] [-Force] [-PassThru] [-Confirm] [-WhatIf]
[<CommonParameters>]
SEE ALSO
Get-Help