Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $a = 1
  2. $amount_of_machines = 30
  3. $machinename = Vswitch
  4.  
  5. while $a < $amount_of_machines
  6. {
  7.     $server_address = "vc05.techlabs.lan"
  8.     $destination_host = "vm06.techlabs.lan"
  9.     $array = "$machinename + $a", "$machinename + $a", "$machinename + $a", "$machinename + $a"
  10.  
  11.  
  12.     Connect-VIServer -Server $server_address -Protocol https
  13.  
  14.     foreach ($vswitch in $array)
  15.     {
  16.         $vswitch = New-VirtualSwitch? -VMHost vm06.techlabs.lan -Name $vswitch
  17.    
  18.     }
  19. {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement