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

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Socket.connect doesn't throw exception in Android -

SPSS keyboard combination alters encoding -