Server 2012 – Force a Network Type with PowerShell

Here’s an annoying one that I run into quite frequently. On Windows Server 2012, it appears there’s not a quick and easy way to change the network type for a network connection other than to use PowerShell. The problem that I typically run into, is that firewall rules for a specific program are only set for the “domain” profile, so here’s how to force the network type on some interface. This is just for my own personal reference, but I took this info directly from here.

To list the network adapters and their interface indexes

Get-NetConnectionProfile

To set the network type for a specific adapter

Set-NetConnectionProfile -InterfaceIndex <index number> -NetworkCategory Private

Leave a Reply