Windows 10 - Changing network profile from public to private

Sometimes you need to make sure that your network profile are defined as “Private”, for instance when you want to connect to the computer with Remote desktop, or other firewall related configurations.

First time you connect to a network you will get a pop up that actually are asking you if you want the network to be used as a “Private” or “Public” network, it just ask in a bit “confusing” way.

(Domain profile” are only available for domain joined computers and will be automatic selected if there is a domain controller on the network).



 

If you select “No” or if you do not select anything, it will be set as a “Public” network. You will not be asked again, even if you do not answer anything.
The “Network and Sharing Center” will show it as a “Public network”

 

Changing it is easy as long as you know where to look or how to do it, but it is not located in the most obvious place.
You can do the changes from the graphical interface or the cool way that attracts the girls, the PowerShell way.
 

The Graphical Way

Go to setting on the “start menu”


 
Select “Network & Internet”

 

Select “Wi-Fi” of “Ethernet” based on the network type you are connected too. And then select “HomeGroup”
 

A faster way is to just type “HomeGroup” in the “start menu” and you will go directly in there
 
Event on a domain joined computer where “Homegroup” have been disabled you can select “Change network location”


You can now select “Yes” on the “Network profile wizard”
 
And now the network will now show up as a “Private network” in “Network and Sharing Center”




Going the other way from “Private” to “Public” profiles can be done by deleting/forgetting the network.
In Setting – “Network & Internet” – “Wi-Fi” select “Manage Wi-Fi Setting”


Select the network and press “Forget”
If you want to be cool and do it from command a prompt (elevated as administrator), you can do it with following commands.
To get the name of the network:
Netsh wlan show profiles
To delete the profile:
Netsh wlan delete profile name=”Getbox-xxxxx”
 

The Powershell way

The easiest and fastest way of doing this are with PowerShell.

To get info about the active network profile:

Get-NetConnectionProfile

To set the desired network category:

Set-NetConnectionProfile -NetworkCategory Private   (Or Public)  

Or combine them into:

Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
 
 
 
A big thanks too Jan Egil Ring PowerShell MVP for getting me the lines
 

 

Popular posts from this blog

Installing Android on a Hyper-V virtual machine

MDT: TimeZoneName and index number list

Quick guide on how to run BgInfo background as Group Policy login