Change your network type in Windows using PowerShell

Change Network location using powershell in Windows

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

change network location windows 8.1, change network location windows server 2012 r2

 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

change network location windows server 2012 R2

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.

Posted in PowerShell, Scripting, Windows 8, Windows Server 2012 R2 and tagged , , , , , .

2 Comments

  1. Pingback: change network type in the windows Registry

Leave a Reply

Your email address will not be published. Required fields are marked *

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