Quickly Turn ON/OFF Windows Firewall Using Command Line
Advertisement
GFI LanGuard your virtual security consultant. Scan your LAN for any vulnerability and automate patch management for Windows, Mac OS & Linux.
Get your FREE trial now!
GFI LanGuard is the essential tool for sysadmins:
- Automate multiple OS patching
- Scan for vulnerabilities
- Audit hardware and software
- Run compliance reports

|
Your FREE trial awaits:
Download a 30 day, fully functional, free trial which also includes GFI technical support.
|
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