Adding new NIC to multiple virtual machines using PowerCLI script
Connect-viserver vcenter_server
$VM = Get-Content D:\servers.txt
New-NetworkAdapter -VM $VM -Type Vmxnet3 -NetworkName network_label -WakeOnLan:$true -StartConnected:$true -Confirm:$false
Disconnect-VIServer -Confirm:$false
Connect-viserver vcenter_server
$VM = Get-Content D:\servers.txt
New-NetworkAdapter -VM $VM -Type Vmxnet3 -NetworkName network_label -WakeOnLan:$true -StartConnected:$true -Confirm:$false
Disconnect-VIServer -Confirm:$false
No comments:
Post a Comment