Defines a type of parameter that is evaluated based on its presence on the command line. Cmdlets and functions can define switch parameters that are evaluated by the Windows PowerShell runtime when the parameters of the command are bound.
Namespace: System.Management.Automation Assembly: System.Management.Automation (in System.Management.Automation.dll)
A switch parameter is a parameter that may, or may not, be specified when the command is run. If the parameter is specified, the Windows PowerShell runtime resolves its value as true. If the parameter is not specified, which is typically the default, the parameter value is resolved as false.