During the COVID-19 global event, I needed to set up VPNs, remote connections…
I also discovered that changing the network connection category can be quite a trick in Windows 10 GUI.
I discovered that is a simple task by using Powershell
Solution
- Open a Powershell window with administrative rights
- run the following command:
Get-NetConnectionProfile
it will show one or more of the following:
Name : my_wifi
InterfaceAlias : Wi-Fi
InterfaceIndex : 7
NetworkCategory : Private
IPv4Connectivity : Internet
IPv6Connectivity : LocalNetwork
- choose the connection to update
- then run the following command to set the desired category:
Set-NetConnectionProfile -interfaceindex <interface_index> -networkcategory <private/public>