powershell "if" needs to set two variables on match -
i need set 2 variables in script...
the first $vmcluster - what's proper syntax set variable if "if" matches?
if ($vmname -like "loupr*") {$vmcluster = "production"}
it's script-block.... use line, or seperate ;
.
if ($vmname -like "loupr*") { $vmcluster = "production" $secondvar = "secondvalue" }
or
if ($vmname -like "loupr*") { $vmcluster = "production"; $secondvar = "secondvalue" }
Comments
Post a Comment