Setting Public/Private/Domain on a NIC after the dialog has gone away.

By | 16 November, 2016

When you first put a network card into a Windows machine it’ll ask which “profile” the network should abide by. This setting relates to which set of firewall rules to apply the machine as its connecting to the network.

Public – means you don’t trust the network you’re attaching to and firewall rules should be stronger.
Private – means you’re on something like you’re home network so the rules are more lax.
Domain – means you’re at work, so again rules are less strict.

On a client Windows machine its (fairly) easy to change these by doing a search for HomeGroup in Cortana or the search bar.

On a windows server its slightly trickier (since HomeGroup is a consumer technology and doesn’t belong on servers). In this case we use a little administrative powershell:

# Shows the current config
get-netconnectionprofile

# sets the profile to Private ("Ethernet" is the name of the network card in this instance)
set-netconnectionprofile -InterfaceAlias Ethernet -NetworkCategory Private