Switch Statement with CaseSensitive Parameter

suggest change

-CaseSensitive makes the match case-sensitive. Without it, string matches ignore case.

Example:

switch -CaseSensitive ('Condition')
{ 
  'condition'   {'First Action'}
  'Condition'   {'Second Action'} 
  'conditioN'   {'Third Action'}  
}
Second Action

The second action is the only action executed because it is the only condition that exactly matches the string 'Condition' when accounting for case-sensitivity.

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents