Quantcast
Channel: VMware Communities: Message List
Viewing all articles
Browse latest Browse all 181285

Re: Removing Network Adapters from Powered On VM's

$
0
0

You can try the following PowerCLI script to remove a network adapter from a virtual machine.

 

$VM = Get-VM -Name "YourVM"

$spec = New-Object VMware.Vim.VirtualMachineConfigSpec 

$spec.deviceChange = New-Object VMware.Vim.VirtualDeviceConfigSpec[] (1) 

$spec.deviceChange[0] = New-Object VMware.Vim.VirtualDeviceConfigSpec 

$spec.deviceChange[0].operation = "remove" 

$spec.deviceChange[0].device = $VM.ExtensionData.Config.Hardware.Device |

  Where-Object {$_.DeviceInfo.Label -eq "Network adapter 1"}

$VM.ExtensionData.ReconfigVM_Task($spec)


Viewing all articles
Browse latest Browse all 181285

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>