are they possible?
Im use to doing items like this in shell scripting.
I was wondering if there is an equivelant in powercli?
case "$1" in
'"item1')
something here
;;
"item2'')
something here
;;
*)
echo "Usage: { item1 | item2 }"
;;
esac
exit 0
It's nearly the same, just a few differences in syntax
$var = "xyz"
switch($var){ 'item1' { "Something for item1"
} 'item2' { "Something for item2"
} Default { "Usage: {item1 | item2}"
} }
For all the Switch details, do a
Get-Help About_switch
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi LucD,
thanks for the info!!