Setting Firewall profiles

You can use the PowerShell cmdlet Set-NetFirewallProfile to turn firewall profiles on and off.

There are three profiles Domain Public and Private.

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True

If you wanted to temporarily turn off the domain profile on one of your computers you could use the following command.

Set-NetFirewallProfile -Profile Domain  -Enabled False

This would just turn off the domain profile you could do testing or whatever task you needed to do and then turn it back on again with

Set-NetFirewallProfile -Profile Domain  -Enabled True.

Another way to do this is with netsh

netsh advfirewall set allprofiles state on

netsh advfirewall set public state off

netsh advfirewall set private state off

netsh advfirewall set domain state on