vethernet 不再显示在 get-netconnectionprofile 中

vethernet 不再显示在 get-netconnectionprofile 中

昨晚我的 Windows 重新启动以安装更新并运行 1903 18362.1016

我需要将 hyper-v vEthernet 适配器设置为专用网络。但是当我这样做时

PS C:\WINDOWS\system32> get-netconnectionprofile


Name             : home-wireless-1
InterfaceAlias   : WiFi
InterfaceIndex   : 12
NetworkCategory  : Public
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic



PS C:\WINDOWS\system32> get-netadapter

Name                      InterfaceDescription                    ifIndex Status       MacAddress             LinkSpeed
----                      --------------------                    ------- ------       ----------             ---------
vEthernet (Default Swi... Hyper-V Virtual Ethernet Adapter             25 Up           00-15-5D-19-34-83        10 Gbps
WiFi                      Intel(R) Dual Band Wireless-N 7260           12 Up           0C-8B-FD-61-A8-D2       270 Mbps
Ethernet 2                TAP-Windows Adapter V9                        8 Disconnected 00-FF-2C-9E-4B-96        10 Mbps
Ethernet                  Intel(R) Ethernet Connection I217-LM          6 Disconnected E0-18-77-DD-D8-F6          0 bps


PS C:\WINDOWS\system32> Set-NetConnectionProfile -interfaceindex 25 -networkcategory private
Set-NetConnectionProfile : No MSFT_NetConnectionProfile objects found with property 'InterfaceIndex' equal to '25'.
Verify the value of the property and retry.
At line:1 char:1
+ Set-NetConnectionProfile -interfaceindex 25 -networkcategory private
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (25:UInt32) [Set-NetConnectionProfile], CimJobException
    + FullyQualifiedErrorId : CmdletizationQuery_NotFound_InterfaceIndex,Set-NetConnectionProfile

PS C:\WINDOWS\system32>

它说没有MSFT_NetConnectionProfile object接口索引 25,即使get-netadapter显示 vEthernet 是25

有什么变化吗?get-netconnectionprofile以前显示我的 vethernet 适配器,但现在只显示 wifi

相关内容