Format of a basic switch statement
$a = 3
switch ($a)
{
1 {"The color is red."}
2 {"The color is blue."}
3 {"The color is green."}
default {"The color could not be determined."}
}Add in a * to the $variable
$a = “d14151”
switch -wildcard ($a)
{
"a*" {"The color is red."}
"b*" {"The color is blue."}
"c*" {"The color is green."}
"d*" {"The color is yellow."}
default {"The color could not be determined."}
}Find the version of Windows
get-wmiObject win32_operatingSystem | Select version