Via Command.exe
Turn Off
netsh advfirewall set allprofiles state off
Turn On
netsh advfirewall set allprofiles state on
Via Powershell
Turn Off
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Turn On
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True