Wednesday, January 6, 2016

Set Windows Server 2012 Network Location / Public or Private

Use below PowerShell commands

Get the list of network profile
Change the network interface to private or Public

Set-NetConnectionProfile -InterfaceIndex <IndexNumber> -NetworkCategory <Private/Public>
PS C:\> Get-NetConnectionProfile

Name             : Network
InterfaceAlias   : Ethernet
InterfaceIndex   : 12
NetworkCategory  : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic

PS C:\> Get-NetConnectionProfile -InterfaceIndex 12 -NetworkCategory Private

No comments: