Switch parameters have no arguments (values); the presence of a switch parameter is sufficient; for example, Recurse is a switch parameter for Get-ChildItem:
SYNTAX
Get-ChildItem ... [-Recurse] ...
As with the other types of parameters, optional use is denoted by square brackets.
Switch parameters, by default, are false (not set). If a switch parameter is true (set) by default, it is possible to set the value to false using the notation, as shown in the following code:
Get-ChildItem -Recurse:$false
In the case of Get-ChildItem, this does nothing; this technique is most widely used with the Confirm switch parameter discussed later in this chapter.