After a restart of one of our servers (a Windows Server 2012 R2), all private connections become public and vice versa (this user had the same problem). Stuff like pinging and iSCSI stopped working, and after some investigation it turned out this was the cause.

The problem is that I don't know how to make them private again. Left-clicking the network icon in the tray shows the "modern" sidebar, but it only shows a list of connections, and right-clicking them doesn't show any options.

What could be the problem, and is there a way to change these settings? I have to make one of the connections public (Internet access), and two of them private (backbone).

up vote 55 down vote accepted

Powershell. Here is an example of changing the network profile of a network interface called Ethernet1 from whatever it is now to "Private." I got this info from Get-Help Set-NetConnectionProfile -Full.

PS C:\>$Profile = Get-NetConnectionProfile -InterfaceAlias Ethernet1

PS C:\>$Profile.NetworkCategory = "Private"

PS C:\>Set-NetConnectionProfile -InputObject $Profile

Documentation: https://technet.microsoft.com/en-us/library/jj899566(v=wps.630).aspx

A GUI way of making this change:

  1. Hit Winkey + R to open Run prompt and type gpedit.msc
  2. Navigate to: Computer Configuration/Windows Settings/Security Setting /Network List Manager Policies.
  3. Choose your Network name in the right pane.
    Note: To show networks not currently connected, right-click Network List Manager Policies in the left pane and choose Show All Networks.
  4. Go to Network Location tab and change the Location type from Public to Private. enter image description here

  5. Close Local Policy Editor.

Source: https://social.technet.microsoft.com/Forums/lync/en-US/82ccc68c-947e-435a-a237-1090f38d0dbe/windows-server-2012-r2-datacenter-network-stuck-in-public-mode

  • This answer is wonderful. Thanks! – DRS David Soft Jun 12 '17 at 22:56
  • How do I set network as Domain Network? – Krunal Sep 27 at 13:57

Using Powershell. Here is an example of changing the network profile of a network interface called Ethernet to "Private." This is a one line command.

Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private

This will work on any local computer with Powershell installed.

  • This is basically what the accepted answer states, right? – Groo Aug 27 '15 at 17:05
  • 5
    This command does not require a variable. One line and done. It is an improved command. – techman Aug 27 '15 at 17:13
  • Also, The reason I discovered this command is because the accepted answer does not work for me. This command sets the connection type directly without discovery. – techman Aug 27 '15 at 18:29
  • 1
    It does BTW not work on Windows 7, this comandlet is introduced in 2012/8. – eckes May 29 '17 at 11:47
  • 2
    Use: get-NetConnectionProfile to check current status and names of your interfaces. – Tilo Jan 19 at 19:18

Another simpler way with Powershell:

Set-NetConnectionProfile -NetworkCategory Private
  • 1
    This could set all NICs to private since no specific adapter is specified. – Overmind Oct 5 '17 at 7:41

I've had a similar issue for months on my home 2012R2 Domain Controller.

After patching and a reboot I could not connect via RDP.

I have MS firewall turned off in GPO for domain networks. After not being able to connect I found that the primary Ethernet connection was listed as public and therefore the firewall was ON.

Why is the NIC changing from domain to public ?
After researching a few articles on the web, I've concluded the following:

After a restart of the only DC in the domain, AD services are not immediately available when the IP stack is initialized.
This results in the OS sensing that this is a public network and it sets the NIC accordingly.

Permanent resolution of this problem on this machine was to set the Network Location Awareness service to delayed start.

This allows AD services to become available and then the OS senses a domain network and sets the NIC accordingly.

  • +1 for the delayed start advice. – Esa Jokinen Jan 28 at 12:10

Had this issue on a VM and just had to restart the Network Location Awareness service to get it to figure out that it was connected to a Domain and start using a domain profile.

What made it work on my Windows Server 2012 R2 standard servers was to enable IPV6 again.

In a move to make future troubleshooting easier for myself I disabled IPV6 left right and center and after doing that the Windows Firewall no longer showed that 'Domain' was connected.

Why on earth Windows can't determine that it's on a domain if only IPV4 is connected is beyond me.

bah

protected by Community Dec 30 '17 at 14:51

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.