Hi Experts,
Can somebody please help me to understand the VMware CLI command to enable\disable (or connect\disconnect) the network adaptor of a VM (which can be done from vsphere client as shown below)
Thanks in advance 🙂
Hi, Did you ever find an answer to this question?
I need to start the NIC on a virtual machine via CLI since the Vsphere server is down and the VMWare client is unable to edit the Virtual machine.
The network adapter was disable on the Vcenter database server.
Thanks!
Get-VM ENTERVMNAME | Get-NetworkAdapter -Name "ENTERNETWORKADAPTER" | Set-NetworkAdapter -Connected:$false -StartConnected:$false -Confirm:$false
That should do it, if you want to do it on all adapters on a VM then it would be as follows, this script wont ask for confirmation it will just go ahead and do it.
Get-VM ENTERVMNAME | Get-NetworkAdapter | Set-NetworkAdapter -Connected:$false -StartConnected:$false -Confirm:$false