October 28th, 2012

PowerTip: Use PowerShell to Enable the Windows Firewall

Doctor Scripto
Scripter

Summary: Learn how to use Windows PowerShell to enable the Windows Firewall.

Hey, Scripting Guy! Question How can I use Windows PowerShell to enable the Windows Firewall on my computer?

      Hey, Scripting Guy! Answer 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

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.

Feedback