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

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

CSS3 Transition to highlight new elements created in JQuery -