Change a Windows Network Profile to Private with PowerShell
Windows uses Public, Private and DomainAuthenticated network categories to control firewall behaviour. Change a profile to Private only when the connected network is trusted.
Check the active profile
Get-NetConnectionProfileChange one interface
Use the interface index returned above:
Set-NetConnectionProfile -InterfaceIndex 12 -NetworkCategory PrivateVerify
Get-NetConnectionProfile -InterfaceIndex 12If the profile is DomainAuthenticated, do not force it to Private as a workaround for domain connectivity. Troubleshoot DNS, domain controller reachability and Network Location Awareness instead.
Changing to Private can enable less restrictive firewall rules, so it should not be used on airport, hotel or other untrusted networks.