Showing posts with label Public. Show all posts
Showing posts with label Public. Show all posts

Wednesday, August 5, 2015

Change Window 8/10 Network Location using PowerShell

One thing that I am really annoyed by Windows 8 and then now Windows 10 is Set/Change network location.  Microsoft manages to make something so easy in Windows 7 to something that is so convoluted in new versions.

If you are comfortable with using commands, you may want to use PowerShell to change the Network Location instead.

1) You need to start PowerShell with elevated user account with command as below.
PSH>Start-Process WindowsPowerShell.exe -verb RunAs
Alternatively, you can type powershell in Search, and run it as an administrator by using the "Run As" option from the context menu (right click)

2) Use the Get-NetconnectionProfile to find out the InterfaceIndex of the connected NIC, e.g.
PSH> Get-NetConnectionProfile
......
Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

3) Use the Set-NetConnectionProfile to change to the desired network location.
PSH> Set-NetConnectionProfile -InterfaceIndex 18 -NetworkCategory Private
That's it. This saves you from switching account, and then jump through hoops to get the network location changed.

(ref: http://blogs.msmvps.com/russel/2013/12/29/set-network-location-to-private-in-windows-8-1server-2012-r2/)

Tuesday, November 19, 2013

From Public To Private

Windows 7 has predefined a set of network locations, namely Home, Work and Public.  The aim of these locations is to alter the protections offered according to the selected locations.  To change from a location to another location is simple in Windows 7.  You simply click on the location, and select a new one, and that is you done.

However, this has changed in Windows 8.  In order to make it more "finger" friendly, Microsoft has changed the location setup to just two locations, namely Private and Public (On and Off), and placed it under network settings (Charm -> Change PC Settings -> Network).  In there, you will the network you are connecting to.  If you click the network icon where you are connecting to, you will see a switch controlling the sharing, i.e. on (Private) and off (Public)

However, there is a catch!  Most of the tutorials I found does not mention a very minor but a very important detail which is this switch is only shown if your Account Control Settings is not set at the highest level.  Since I have my Account Control Settings set to its maximum, I COULD NOT see this options till I found this article: http://www.eightforums.com/tutorials/9837-network-location-set-private-public-windows-8-a.html

If you are like me, like a bit of extra security, and have set the Account Control Settings to its highest level, then you may want to dial it down temporary to see this switch.