I am working on a script to change a couple of hundred VMs to a different VLAN.
The script is working in test EXCEPT, I am being prompt to confirm the change. I have never been prompted before to confirm the change. One of the options is YES TO ALL however I want my script not to prompt at all, just make the change.
Script:
FYI: I am using PowerGUI to edit my PowerCLI scripts.
Thanks,
Boston Tech Guy
Discussion moved from Automation Tools to VMware vSphere™ PowerCLI
Change
Set-NetworkAdapter -NetworkAdapter $NIC -NetworkName "MyNewVLan 1234"
To
Set-NetworkAdapter -NetworkAdapter $NIC -NetworkName "MyNewVLan 1234" -Confirm:$false
Discussion moved from Automation Tools to VMware vSphere™ PowerCLI
This worked perfectly.
Thank You.
Boston Tech Guy