Changes

Jump to: navigation, search

The Windows PowerShell 1.0 switch Statement

13 bytes added, 19:03, 3 December 2008
Wildcards, Regular Expressions and Case Sensitivity in switch Statements
When using wildards, the ''-wildard'' option must be passed through the switch statement. The following example demonstrates the use of wildcards when seeking a match to a particular value in a switch statement:
<pre>
$beginsWith = "Red"
Blue* { "BlueZone" }
}
</pre>
When executed, the above statement produces matches for anything that begins with "Red":

Navigation menu