Set Network Location Server 2012 R2

If you have ever worked with Windows Server 2012 R2 in a non domain or standalone environment, then chances are you have crossed paths with what I consider a minor annoyance. Sometimes a network will be identified as Public when it should be Private. Changing this option in the GUI is not possible from what I can tell. Without further ado, in this article we will take advantage of Windows Powershell to set out Network Location to Private on a Standalone Windows Server 2012 R2 install. In order to accomplish this task, you will want to fire up the Powershell Command Window and run the commands below.

$Profile = Get-NetConnectionProfile -InterfaceAlias Ethernet
$Profile.NetworkCategory = "Private"
Set-NetConnectionProfile -InputObject $Profile

Note that in the command above on line one you will need to replace Ethernet with the interface you are trying to configure. Once the commands are run, you will notice Network and Sharing Center is now reporting the network as Private. If you are like me and OCD about certain things, you may find you would also like to change the Network Name. This optional step can be accomplished with a simple registry edit. Open regedit and navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\NetworkList\Profiles. Under this key, search for the current network name as pictured above highlighted in yellow. Once you find the right Network simply edit the key and change the name to anything you want.

Did you find this article useful? Why not share it with your friends?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.