Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $a = 1
- $amount_of_machines = 30
- $machinename = Vswitch
- while $a < $amount_of_machines
- {
- $server_address = "vc05.techlabs.lan"
- $destination_host = "vm06.techlabs.lan"
- $array = "$machinename + $a", "$machinename + $a", "$machinename + $a", "$machinename + $a"
- Connect-VIServer -Server $server_address -Protocol https
- foreach ($vswitch in $array)
- {
- $vswitch = New-VirtualSwitch? -VMHost vm06.techlabs.lan -Name $vswitch
- }
- {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement