You’re having one of those days. Remote Desktop isn’t working. The Windows Firewall is constantly in your way. You hop in to the Network and Sharing Center and there it is, your network adapter staring you down with a Public network category. As Windows makes this a complete pain in the bum to change, off to PowerShell we go.
- Open a PowerShell prompt as an Administrator.
- Run Get-NetConnectionProfile to retrieve a list of all of the current network connections. Take note of the InterfaceIndex for the connection you’d like to update.
- With your InterfaceIndex in hand, run Set-NetConnectionProfile and pass in the InterfaceIndex and the desired NetworkCategory. [e.g. Set-NetConnectionProfile -InterfaceIndex 11 -NetworkCategory Private]
- Rejoice in your network connection that is now in the right category.