Skip to content

Instantly share code, notes, and snippets.

@ChrisLGardner
Created March 10, 2020 09:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ChrisLGardner/d704c6aa3a39205d92c1ba3e4fed4846 to your computer and use it in GitHub Desktop.
Save ChrisLGardner/d704c6aa3a39205d92c1ba3e4fed4846 to your computer and use it in GitHub Desktop.
function test-switch {
param (
[switch]$switch1,
[switch]$switch2,
[switch]$switch3,
[switch]$switch4
)
switch ($true) {
$switch1 { "test1" }
$switch2 { "test2" }
$switch3 { "test3" }
$switch4 { "test4" }
Default { "none"}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment