- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CLI command to connect\disconnect a VM's NIC
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 ![]()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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