Monthly Archives: December 2013

Set Network Location to Private in Windows 8 & 10 and Windows Server 2012 & 2016

One of those annoyances that sometimes happen with the new Network Location in Windows 8.x and Windows 10 is that the network gets mis-identified as Public when it should be Private, or the other way around. Changing this in the GUI is certainly possible, but annoying, so let's take advantage of the improved Windows PowerShell support in Windows 8.1 (and later) and do it quickly and easily. First, let's open up an elevated PowerShell window from our limited user session:

PSH> Start-Process WindowsPowerShell.exe -verb RunAs

Now, in that window, let's find out what our current network location is set to:

PSH> Get-NetConnectionProfile
...<snip>...
Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

From this, we see that the problem interface has an Interface Index of 18, so:

PSH> Set-NetConnectionProfile  -InterfaceIndex 18 -NetworkCategory Private

And we're done.

ETA, 3 August, 2016 -- this same problem exists in Windows 10/Server 2016. And the solution is the same. Set-NetConnectionProfile is your friend!