1,723
edits
(Created page with "Here's a frustrating issue: Windows never seems to get the type of network it is connected to in the Network Sharing Center / Network Discovery. It can be Public, Private, an...") |
m |
||
Line 3: | Line 3: | ||
To fix it, do the following | To fix it, do the following | ||
* Run PowerShell as Administrator | *Run PowerShell as Administrator | ||
* To get the name of the Interface: get-netconnectionprofile | *To get the name of the Interface: get-netconnectionprofile | ||
* set-netconnectionprofile | *To set the type of network (public, private, etc.): set-netconnectionprofile -NetworkCategory Private -InterfaceIndex WhatEverIndexNumber | ||
**OR; | |||
OR | ***set-netconnectionprofile -NetworkCategory Private -InterfaceAlias "WhatEverAliasName" | ||
***...etc., but InterfaceIndex is better because it's just a number, whereas the InterfaceAlias might have characters that cause issues on the command line. | |||
* set-netconnectionprofile -InterfaceAlias " | |||
Sources; | Sources; | ||
* https://www.itechtics.com/change-network-type-windows-10/ | *https://www.itechtics.com/change-network-type-windows-10/ | ||
* https://docs.microsoft.com/en-us/powershell/module/netconnection/set-netconnectionprofile?view=win10-ps | *https://docs.microsoft.com/en-us/powershell/module/netconnection/set-netconnectionprofile?view=win10-ps | ||
Special Note: It often times doesn't get the name of the Interface / "Active Network" correct either. In Network connections the same item is referred to as "Status". In PowerShell it refers to it as Name. Woof! Sadly, the "Name" cannot be set. | Special Note: It often times doesn't get the name of the Interface / "Active Network" correct either. In Network connections the same item is referred to as "Status". In PowerShell it refers to it as Name. Woof! Sadly, the "Name" cannot be set. |