Summary: Learn how to use Windows PowerShell to enable the Windows Firewall.
How can I use Windows PowerShell to enable the Windows Firewall on my computer?
On Windows 8 or Windows Server 2012, use the Set-NetFirewallProfile cmdlet.
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
On earlier versions of Windows, use NetSh.
netsh advfirewall set allprofiles state on