Severity Level: Warning
Switch parameters for commands should default to false.
Change the default value of the switch parameter to be false.
function Test-Script
{
[CmdletBinding()]
Param
(
[String]
$Param1,
[switch]
$Switch=$True
)
...
}
function Test-Script
{
[CmdletBinding()]
Param
(
[String]
$Param1,
[switch]
$Switch=$False
)
...
}