Anyone know how I can have a switch statement with multiple possible values like the example below?
switch ($myNumber) {
1 3 5 7 9 { write-host "Odd" }
2 4 6 8 10 {write-host "Even" }
}
Used to be easy in VBScript, so I'm sure i'm just missing something simple.
e.g in VBScript
Select Case myNumber
Case 1,3,5,7,9
MsgBox "Odd"
Case 2,4,6,8,10
MsgBox "Even"
End Select
Cheers in advance,
Ben
Best Answer