-
hyphon i.e. Any-Cmdlet -Parameter1 -Parameter2
<space>
char.Example of such parameter is Get-Process -Name svchost
here -Name
is a Parameter and ‘svchost’ is its value.
Get-Help
and see the syntax section, you will see a list of parameters which you can supply to given CmdLet-ParameterName
the first positional parameter will be considered as defaultSingle-Value Vs Multi-Value Parameter | Notice <string> vs <string[]> |
<string>
is a single string i.e. Single Value can be supplied.<string[]>
is an array of strings i.e. Multiple string values can be suppliedTest-Connection -ComputerName 127.0.0.1 10.0.0.1
here -ComputerName parameter is <string[]>
type hence two IPs are supplied as input The common parameters are:
-Verbose
-Debug
-WarningAction
-WarningVariable
-ErrorAction
-ErrorVariable
-OutVariable
-OutBuffer
The risk mitigation parameters are:
-WhatIf
-Confirm