Windows 10: Change a network connection from Private to Public

Today I accidentally set a hotel wifi hotspot as a private network. Network discovery is turned on for private networks, and immediately I could see a dozen computers, a couple of printers and a Windows homegroup.

Oops.  This is "not great".

Changing a network type from Private to Public or Private to Domain is not intuitive at all in Win10.  I tried the Network and Sharing Center.  I tried Network Settings.  I tried right-clicking the network connection.  I poked around in the NIC settings.  I tried [a lot] and failed utterly.

I finally found a solution on one of Mark Minasi's old newsletters at
http://www.minasi.com/newsletters/nws1304.htm

The trick is to use powershell.

Click Start
Type PowerShell
Right-Click Windows Powershell and select "Run as Administrator"
In the Powershell Prompt:
Type "Get-Netadapter" to list your network adapters.
Type "Get-NetConnectionProfile -InterfaceAlias "Your Adapter name here"" to get the connection name.  Most people will have "Wi-Fi" as the adapter name.  Mine is a little different because I am using Hyper-V to carry around my lab machines.
Type "Set-NetConnectionProfile -name "yourNetConnectionHere" -NetworkCategory public" to change the connection to public.
Type "Get-NetConnectionProfile -name "yourNetConnectionHere"" to verify the change.

It works, I'm happy. 

Changing Network from Private to Public in Windows 10
Thanks Mark!  Magic!

Comments