Posted on February 17, 2015 · Posted in Windows 8, Windows Server 2012

How to Change a Network Type from Public to Private in Windows

One of the troubles a new network connection sometimes faces in Windows 8 / 2012 is that the network is wrongly detected as Public Network when it has to be detected as Private  and vice versa. You cannot change the network type from the graphical interface of Network and Sharing Center.

So, let’s use the improved Windows PowerShell in Windows 8.1 and do it quickly and easily. First of all, open PowerShell window elevated (as administrator):

You can do it in any convenient way, for example, like this:

Start-Process PowerShell.exe -verb RunAs

Now let’s see how the current network is detected in a new window that appears:

PSH> Get-NetConnectionProfile
Name : Network 4
InterfaceAlias : Ethernet0
InterfaceIndex : 3
NetworkCategory : Public
IPv4Connectivity : Internet
IPv6Connectivity : LocalNetwork

Of course, you’ll get your own results. Here is a live snapshot from virtual Windows 8.1.

Get-NetConnectionProfile - Windows 2012

As you can see, the problem interface has index 3 and the network category is Public.

The same can be seen in Windows Explorer, and GUI doesn’t allow to change the connection type:

network 4 public network

To change the situation (in my case the index equals to 3, as you remember), run the following command:

Set-NetConnectionProfile  -InterfaceIndex 3 -NetworkCategory Private

And… Bingo! The connection type has been changed to Private.

Set-NetConnectionProfile  -InterfaceIndex 3 -NetworkCategory Private

The network category can also be changed from the Registry Editor. To do it, run regedit.exe and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles, containing profiles of all network connections.

You can find the necessary network profile in the Network and Sharing Center by its name listed in the ProfileName registry key. The type of network is specified in the Category value. The following values of this key are available:

  • 0 — Public Network
  • 1 — Private Network
  • 2 — Domain Network

ProfileName - registry

Change the key value to the one you need and restart your computer.

Another way to change the network category is using the Local Security Policy Editor. Run secpol.msc snap-in and go to Network List Manager Policies. On the right, find your network by its name as it is displayed in the Network and Sharing Center. Open the network properties and go to the Network Location tab, then change the network type to Private and save the changes.

Network List Manager Policies

Note. If a server or a computer belongs to a domain, you cannot change the network type: after the restart, it will automatically be changed back to Domain Network.

Related Articles