Windows Firewall with Advanced Security can be accessed from the GUI, a command prompt, or PowerShell. This quickstart guide outlines several useful commands and techniques to assist debugging Windows Firewall.
Run Windows Firewall from the GUI
If using the GUI, use one of the following methods to launch Windows Firewall.
From Windows UI
- Click Search
- Type Windows Firewall
- Select Windows Firewall with Advanced Security
MMC
- Add snap-in for Windows Firewall with Advanced Security.
From the command line
To turn off the Windows Firewall with Advanced Security console
- Open Server Manager.
- Select Windows Firewall with Advanced Security from the Tools menu.
- In the center pane, click Windows Firewall Properties.
- There are three profile tabs in the properties window, corresponding to the three Windows Firewall profiles (domain, private, and public). In each profile tab, select Off from the Firewall state dropdown list.
- Click OK to close the firewall properties window.
Enable and disable Windows Firewall from the command line
These command must be run from an administrative command prompt or PowerShell.
Turn on the firewall using netsh
netsh advfirewall set allprofiles state on
Turn off the firewall using netsh
netsh advfirewall set allprofiles state off
Turn on the firewall using Windows PowerShell
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Turn off the firewall using Windows PowerShell
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Additional resources
For more help with Windows Firewall using PowerShell, see the Microsoft article Windows Defender Firewall with Advanced Security Administration with Windows PowerShell
For more details about using Group Policy or MMC snap-ins, refer to the Microsoft documentation.
Want to contribute?
You could earn up to $600 by adding new articles.