I have the following variable:
$UPNSuffixChange = $True
In my script there's an if statement that will only run if this is true:
If ($UPNSuffixChange) {}
The idea being that the variable can be set to $False resulting in this section being skipped.
How can I restrict the value of this variable to only $True or $False to avoid mistyped values?
$UPNSuffixChangea[switch]parameter of a function or the script as a whole, so passing the correct value is simple and natural. Cmdlets are much friendlier than loose scripts.