How to Enable/Disable Windows Firewall through Command Prompt in Windows 11

If you have a premium anti-virus software installed in your machine, then having Windows Firewall turned on at the same time may cause system instabilities. In that case, you might want to turn your Windows Firewall off. This article explains in detail how you can quickly enable or disable your Windows Firewall through Command Prompt with some very easy steps.

Note: Unless you have a very good anti-virus application installed in your machine, it is definitely not recommended to turn off Windows Firewall as it might open the door to many malicious attacks in your system.

How to Disable Windows Firewall through Command Prompt

Step 1: On the taskbar, click on the Search icon.

 



1 Search Icon Optimized Optimized

 

Step 2: In the search bar, type in command prompt and choose the Run as administrator option.

 

2 Cmd Run As Admin Optimized Optimized

 

Step 3: When Command Prompt launches in admin mode, type in or copy-paste the following command and hit Enter key to disable Windows Firewall.

NetSh Advfirewall set allprofiles state off

 

3 Cmd Command Turn Off Optimized

 

Step 4: That’s it. You will get a notification window saying that your Windows Firewall is now turned off. Simply click on the Dismiss button to close this window.

 

4 Turned Off Notification Optimized

 

How to Enable Windows Firewall through Command Prompt

Step 1: Just like in the previous method, launch Command Prompt in elevated mode first.

 

2 Cmd Run As Admin Optimized Optimized

 

Step 2: Type in or copy-paste the following command and hit Enter key to enable the Windows Firewall.

NetSh Advfirewall set allprofiles state on

 

5 Cmd Command Turn On Optimized



 

Step 3: You won’t get any notification saying that your Firewall is turned on. So, if you would like to check the status of your Windows Firewall from Command Prompt, type in the following command and hit Enter key.

Netsh Advfirewall show allprofiles

 

6 Firewall Status Optimized

 

Hope you found the article useful.