Tuesday, August 5, 2014

Switching Network Category in Windows 2012 R2

Seriously, it is annoying when the rights to change it is taken away from you.

Credit to Charlie Russel, you can change it using Powershell

First, find out what is the InterfaceIndex of the NIC that you are planning to modify:
Get-NetConnectionProfile

It will return something similar as below

Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

Once you found the InterfaceIndex, you can use the command below.
Set-NetConnectionProfile  -InterfaceIndex 18 -NetworkCategory Private

No comments: