- 30 Jun 2023
- 1 Minute to read
- Print
- DarkLight
MS Server 2012/2016 Shows Wrong Network Profile
- Updated on 30 Jun 2023
- 1 Minute to read
- Print
- DarkLight
One of those little annoyances that can sometimes happen with the Network Locationin MS Server 2012/2016, is that the network gets misidentified as Public when it should be Private, or the other way around. Changing this in the GUI is possible, but can be annoying and time consuming, so we can take advantage of the improved Windows PowerShell support in Server 2012 and 2016 and do it quickly and easily.
1. First, let's open up an elevated PowerShell window. Click the Start button in the bottom left. Type Powershell then right-click on its icon and Run as Administrator. Newer versions of windows are as seen below:
Now, in that window, let's find out what our current network location is set to:
Get-NetConnectionProfile
From the above example, we see that the problem interface has an Interface Index of 18, so:
Set-NetConnectionProfile -InterfaceIndex 18 -NetworkCategory Private
By entering the above we have now set its Interfaceindex and set it it's NetworkCatgeory to Private.
This can also occur on domains attached servers. In that case, it will usually be necessary to detach the server from the domain, run the above procedure, then reattach to the domain. This will require Domain Administrator credentials.