Skip to content

Changing the Network Profile in Windows Server 2012

Sometimes I have a virtual machine running Windows Server 2012 and can’t reach some of its services because I allowed their ports only for private networks in the Windows Firewall. Then I see that the network connection has the public profile. This is the easiest way I found to change the profile:

Open a PowerShell with administrator privileges and type


You should get a list of network interfaces:

Name             : Network
InterfaceAlias   : Ethernet
InterfaceIndex   : 12
NetworkCategory  : Private
IPv4Connectivity : Internet
IPv6Connectivity : NoTraffic

Name             : Network #2
InterfaceAlias   : LAN-Connection
InterfaceIndex   : 17
NetworkCategory  : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : NoTraffic

You see that the second network is a public network. Use the InterfaceIndex 17 and enter:

Set-NetConnectionProfile -InterfaceIndex 17 -NetworkCategory Private

Now it is a private network!


No Trackbacks


Display comments as Linear | Threaded

No comments

Add Comment

Enclosing asterisks marks text as bold (*word*), underscore are made via _word_.
Standard emoticons like :-) and ;-) are converted to images.

To prevent automated Bots from commentspamming, please enter the string you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

Form options