Skip to content

Instantly share code, notes, and snippets.

@alainassaf
Created July 27, 2018 14:05
Show Gist options
  • Save alainassaf/b8da43bb80ad6487801e38c3c47ac0d5 to your computer and use it in GitHub Desktop.
Save alainassaf/b8da43bb80ad6487801e38c3c47ac0d5 to your computer and use it in GitHub Desktop.
Switch to change to name
switch ($_) {
"192.168.50.1" {$xsn = "XenServerPool1"; break}
"192.168.50.2" {$xsn = "XenServerPool2"; break}
default {"UNKNOWN XENSERVER"; break}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment