In this article, we examine the concept of the network profile in Windows, the types of existing network profiles, their usefulness and how we can change the assigned network profile in Windows 10 and Windows Server 2019/2016 from public to private or vice versa. This is necessary if the location of the network is wrongly defined as a public network, whereas it should be a private network.
Windows Network Profiles are part of the Windows Defender Firewall with Advanced Security and allow you to apply different firewall rules depending on the type of network your computer is connected to. Depending on the profile you use for your network connection, other computers may or may not see your computer on the network (network detection settings), use shared network folders, and use printers.
What is a network location (profile) in Windows?
Network Profiles first appeared in Vista/Windows Server 2008. In Windows 10 (Windows Server 2016), you can assign one of the following network security profiles (slots) to a Network Interface Card (NIC), whether Ethernet or Wi-Fi :
- Private or home network – profile of the trusted network (home or office). On such a network, your computer can be recognized by other devices; you can share files and printers.
- Public network – profile of an unreliable network (public Wi-Fi network in the metro, cafes, airport). You do not trust other devices on such a network, your computer is hidden from other devices on the network, and no one has access to shared network folders and printers on your computer;
- Domain Network – Profile of computers that are members of an Active Directory domain. Applies automatically after Windows has joined the AD domain. You can apply the domain firewall policy to this profile.
Network Location Awareness (NLA) is used by Windows to determine whether a network connection is on a public, private or domain network.
As mentioned before, depending on the network profile of your network card, different Windows Firewall rules are applied to your network connections.
In Windows 10, you can check the current network profile (location) assigned to the network connection under Settings -> Network and Internet. On my screenshot you can see that the public profile is assigned to the Ethernet0 network card.
In the Classic Control Panel, the network type for active network connections is displayed here: Control Panel -> All items of the Control Panel -> Network and Sub-Centre. However, you cannot change the location of the assigned network from the Classic Control Panel. For example, on Windows Server 2012 R2 / Windows 8.1 you can only change the network profile via PowerShell, the registry or the local security policy (described below).
How do I create a network profile in Windows 10?
The network profile in Windows 10 is selected by the user when the device first connects to a new network. A hint appears:
Network 2
Do you want your PC to be recognized by other PC’s and devices in this network?
We recommend that you allow it on your home and business networks, but not on public networks.
If you choose Yes, the private office is assigned to the network, if you choose No, the public office is assigned. The next time you connect to the same LAN or WiFi network, the previously selected profile will be automatically assigned.
You can hide the Network Location Wizard when connecting to a new network using the registry. Simply create an empty registry key to HKEY_LOCAL_MACHINESystemCurrentControlSetControlNetworkNewNetworkWindowOff. Thereafter, all networks are considered public.
You can reset all network settings and profiles stored in Windows 10 by selecting Settings -> Network and Internet -> Status -> Reset Network and restart the computer.
Now that you are connected to the network, you are once again invited to discover the network.
How do I change my Windows 10 network location from public to private?
You can change the network profile from the Windows 10 GUI. If you are using the New settings panel, go to Network and Internet -> Status -> Change connection properties.
Here you can change the profile of the network location from public to private and vice versa.
You cannot change the network profile from the classic Control Panel in Windows 10.
You also cannot change the network profile of a computer connected to a domain. The domain profile is always used to connect to the domain network.
Changing the network type using PowerShell under Windows 10
On Windows 10/Windows Server 2016/2019, you can manage the location of the network connection using PowerShell. Launch the Advanced PowerShell console.
Now use the Get-NetConnectionProfile cmdlet to get a list of the computer’s network adapters and their network profiles.
In my example, there is only one physical network adapter on the computer that has the type of public network location (in the NetworkCategory value, you can see the following types of network profiles: public, private, or authenticated by a domain).
Let’s try changing the network profile assigned to the network card. You must obtain the index assigned to this TIN. In this example, the interface index is 8.
Name: Network 2
InterfaceAlias : Ethernet0
InterfaceIndex : 8
Category of the network : Public
IPv4Connectivity : Internet
IPv6 Connectivity : NoTraffic
After obtaining the network adapter index, you can change the network type to Private :
Set-NetConnectionProfile -InterfaceIndex 8 -NetworkCategory Private
Make sure the network profile has been changed:
Get-NetConnectionProfile -InterfaceIndex 8
The new firewall rules are applied to the interface according to the assigned network profile without rebooting.
You can also change the network profile of all network adapters on your computer at the same time:
Get-NetConnectionProfile | Set-NetConnectionProfile -NetworkCategory Private
Configuring the network type via the Windows registry
The network type can also be changed in the registry editor. To do this, start regedit.exe and navigate to the next key: HKEY_LOCAL_MACHINESOFTWARemicrosoftWindows NTC CurrentVersionNetworkListProfiles. This registration key contains the profiles of all network connections.
You can find the desired network profile by name in the list (in the Network and Sharing Center) in the ProfileName registry setting.
The network type is specified in the parameter Category. The following values are available :
- 0 – Public network
- 1 – Private network
- 2 – Domain network
Change the value of the key to the desired value and restart the computer.
Changing the type of network location using the security policy
Another way to change the type of network location is to use the Local Security Policy Editor. Start the secpol.msc snapshot and go to the Network List Manager Policies page. On the right you can find your network by the name as it appears in the Network and Sharing Center. Open the network properties and click on the Network Location tab, then change the network type from Unconfigured to Private and save the changes. To prevent users from changing their network profile, select the option User cannot change the location.
Pay attention. If the server or computer is connected to an AD domain, you cannot change the network type. After rebooting, it automatically returns to the domain network.
Related Tags:
windows server 2019 unidentified network,windows server 2019 network type,set-netconnectionprofile,network profile not showing windows 10,windows server change network type to domain,windows 10 private networks not connected,powershell change public to private,windows 7 change network type to domain,windows 10 network profile missing,which is safer public or private network,change network from public to domain,network profile public or private reddit,change win7 network to private,windows 10 change public network to private,domain controller network private,win 2016 change network type,get-netconnectionprofile windows 7,change network adapter from public to private,windows 7 change network type regedit,gpedit private network,windows 10 change network type to domain,get-netconnectionprofile,how to change hamachi to private network,windows network location domain,network connection showing as public,set-netconnectionprofile private,domain network showing as public windows 7,windows 10 not connecting to domain network,active domain network not connected,windows 10 set network to private powershell,windows 10 change wired network to private,change network from private to public server 2016,windows server 2019 change network profile from private to domain,change network from public to private windows 10,change network from public to private server 2016 powershell,the network location profile changes from "domain" to "public" windows 10,change network from public to private server 2012,server 2008 r2 change network from private to domain