Quickly Turn ON/OFF Windows Firewall Using Command Line

by Nirmal Sharma [Published on 16 Dec. 2010 / Last Updated on 31 Oct. 2009]

This article explains how you can quickly Turn Windows Firewall On or Off. This tips applies to Windows Vista, Windows 7 and Windows Server 2008 only!

Windows Firewall on computers running Windows Vista, Windows 7 and Windows Server 2008 is enabled by default. You may need turn it off for various reasons.

This is how you do it using a command prompt:

  • To Turn Off: 
  • NetSh Advfirewall set allprofiles state off
  • To Turn On: 
  • NetSh Advfirewall set allrprofiles state on
  • To check the status of Windows Firewall: 
  • Netsh Advfirewall show allprofiles

 

Featured Links