Change Network location using powershell in Windows
How to Change Network location using powershell in Windows 8/8.1 and Windows Server 2012 and Windows Server 2012 R2.
First open Powershell as Administrator then run:
Get-NetConnectionProfile
Then run:
Set-NetConnectionProfile -InterfaceIndex 15 -NetworkCategory Private
The InterfaceIndex is selecting the specific network adapter and the available options for the –NetworkCategory parameter are (Private or Public) and are documented here:
https://technet.microsoft.com/en-us/library/jj899565%28v=wps.630%29.aspx
After setting the profile then verify by running the Get-NetConnectionProfile command one more time and look at what Windows displays in PowerShell for the network location profile type under the NetworkCategory line item.
Reboot and double verify and as long as no outside factors are deciding this like a GPO then you have successfully changed the network profile.
Pingback: change network type in the windows Registry
Worked perfectly. Thanks!