How do I make a connection private on Windows Server 2012 R2

Powershell. Here is an example of changing the network profile of a network interface called Ethernet1 from whatever it is now to “Private.” I got this info from Get-Help Set-NetConnectionProfile -Full.

PS C:\>$Profile = Get-NetConnectionProfile -InterfaceAlias Ethernet1

PS C:\>$Profile.NetworkCategory = "Private"

PS C:\>Set-NetConnectionProfile -InputObject $Profile

Documentation: https://docs.microsoft.com/en-us/powershell/module/netconnection/set-netconnectionprofile?view=winserver2012r2-ps

Leave a Comment