Cant remove hyper-v' virtual adapter

Hello.

I had remove phisical network adapter from system.

Now i cant delete old virtual adapter from Hyper-V control panel!

I had tried script from article: http://blogs.technet.com/b/jhoward/archive/2009/07/01/hyper-v-how-to-remove-disabled-virtual-network-adapters-from-the-parent-partition.aspx 

But script not works on win8.1. (probable cause namespace root\virtualization not avail on win8.1).

Please help.

April 23rd, 2015 2:08pm

Correct - WMI v1 namespace calls will not work.

But the code can be updated by adding 'v2' to the WMI URI string  ..\virtualization\v2\....

Have you tried  the cmdlet "remove-vmswitch"

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 3:11pm

cmdlet "remove-vmswitch" throws exception:

PS C:\Windows\system32> Get-VMSwitch

Name   SwitchType NetAdapterInterfaceDescription
----   ---------- ------------------------------
HyperV External    м Realtek PCIe GBE
hV     Internal


PS C:\Windows\system32> Remove-VMSwitch 'hV'


     "hV"?
[Y]  - Y  [A]    - A  [N]  - N  [L]    - L  [S]  - S  [?] 
(м  м  "Y"):
Remove-VMSwitch :     мм Ethernet.
:1 :1
+ Remove-VMSwitch 'hV'
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Remove-VMSwitch], Virtualizat
   ionOperationFailedException
    + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.RemoveVMSwitchCommand

Changing namespace in script to "root\\virtualization\\v2" occurs next error: 80041088 on line 

this.m_VirtualSwitchManagementService = list.ItemIndex(0);


April 23rd, 2015 3:43pm

It is all about the physical adapter going missing.

Can you change the virtual network type to Internal?  This would remove any external NIC binding.

Another trick involves a utility to spoof a physical NIC (I don't think is publically available).

Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 5:07pm

cmdlet "remove-vmswitch" throws exception:

PS C:\Windows\system32> Get-VMSwitch

Name   SwitchType NetAdapterInterfaceDescription
----   ---------- ------------------------------
HyperV External    м Realtek PCIe GBE
hV     Internal


PS C:\Windows\system32> Remove-VMSwitch 'hV'


     "hV"?
[Y]  - Y  [A]    - A  [N]  - N  [L]    - L  [S]  - S  [?] 
(м  м  "Y"):
Remove-VMSwitch :     мм Ethernet.
:1 :1
+ Remove-VMSwitch 'hV'
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Remove-VMSwitch], Virtualizat
   ionOperationFailedException
    + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.RemoveVMSwitchCommand

Changing namespace in script to "root\\virtualization\\v2" occurs next error: 80041088 on line 

this.m_VirtualSwitchManagementService = list.ItemIndex(0);


April 23rd, 2015 7:41pm

cmdlet "remove-vmswitch" throws exception:

PS C:\Windows\system32> Get-VMSwitch

Name   SwitchType NetAdapterInterfaceDescription
----   ---------- ------------------------------
HyperV External    м Realtek PCIe GBE
hV     Internal


PS C:\Windows\system32> Remove-VMSwitch 'hV'


     "hV"?
[Y]  - Y  [A]    - A  [N]  - N  [L]    - L  [S]  - S  [?] 
(м  м  "Y"):
Remove-VMSwitch :     мм Ethernet.
:1 :1
+ Remove-VMSwitch 'hV'
+ ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Remove-VMSwitch], Virtualizat
   ionOperationFailedException
    + FullyQualifiedErrorId : Unspecified,Microsoft.HyperV.PowerShell.Commands.RemoveVMSwitchCommand

Changing namespace in script to "root\\virtualization\\v2" occurs next error: 80041088 on line 

this.m_VirtualSwitchManagementService = list.ItemIndex(0);


Free Windows Admin Tool Kit Click here and download it now
April 23rd, 2015 7:41pm

Type of virtual network is already Internal. Also can't change to anothe type - throws error.

In device manager two ones marked with yellow signs and is not removable from the system. I had tried to remove this devices in the safe mode - fail.

April 24th, 2015 12:00am

Hi Viktor Khokhryakov,
The main issue is to remove the virtual adapter from the machine ,right ?
Have you tried to remove it from the configuration tab ?
Here is a link for reference:
Add or remove a virtual network adapter
https://technet.microsoft.com/en-us/library/cc708372%28v=ws.10%29.aspx?f=255&MSPPError=-2147217396

We also can check the folowing link , take Nick Ferreri`s and Rasmus Jacobsen`s suggestions to have a check .Please back up the registry keys before we tried to make modifications to it.
hyper-v networking woes
https://social.technet.microsoft.com/Forums/windowsserver/en-US/f6673b1e-f8dc-47c9-80ff-178db17b2962/hyperv-networking-woes?forum=winserverhyperv

Best regards

Free Windows Admin Tool Kit Click here and download it now
April 27th, 2015 4:02am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics