Created
January 13, 2018 19:17
-
-
Save mattmcnabb/dd70021db8800c6aa19a880f55fa2eb9 to your computer and use it in GitHub Desktop.
Switch evaluates arbitrary scriptblocks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$TestValue = "nuffin" | |
switch ($TestValue) | |
{ | |
"sumpin" | |
{ | |
"this does not run" | |
} | |
"nuffin" | |
{ | |
"This runs" | |
} | |
{$true} | |
{ | |
"But this runs too" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment