Hyper-V 中的旧 VM 交换机不再使用,当我尝试删除它时,它总是失败并显示以下消息:
PS C:\> Get-VMSwitch nat
Name SwitchType NetAdapterInterfaceDescription
---- ---------- ------------------------------
nat Private
PS C:\> Get-VMSwitch nat | Remove-VMSwitch -Force
Remove-VMSwitch : Failed while removing virtual Ethernet switch.
Switch delete failed, switch = 'acf82f05-c07c-4b35-8588-921498456027': General access denied error (0x80070005).
At line:1 char:20
+ Get-VMSwitch nat | Remove-VMSwitch -Force
+ ~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : PermissionDenied: (:) [Remove-VMSwitch], VirtualizationException
+ FullyQualifiedErrorId : AccessDenied,Microsoft.HyperV.PowerShell.Commands.RemoveVMSwitch
Run Code Online (Sandbox Code Playgroud)
尝试在 GUI 中删除也不起作用: