Last night my windows rebooted to install updates and is running 1903 18362.1016
I need to set my hyper-v vEthernet adapter to a private network. However when I do
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>
It says there is no MSFT_NetConnectionProfile object
with interface index 25, even though get-netadapter
shows vEthernet is 25
Has something changed? get-netconnectionprofile
used to show my vethernet adapter, but now it only shows the wifi