> For the complete documentation index, see [llms.txt](https://book.ice-wzl.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://book.ice-wzl.xyz/firewalls/netsh-advfirewall.md).

# netsh advfirewall

### See Current State

```
netsh advfirewall show currentprofile
#turn off 
netsh advfirewall set allprofiles state off
#turn on 
netsh advfirewall set allprofiles state on 
```

### Turn Firewall on or off

```powershell
Get-NetFirewallProfile | Select Name, Enabled
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False
Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
```
