Powershell Tip #64: Enable or Disable the Windows Firewall

By | November 11, 2015

Tip: You can enable or disable the Windows Firewall :

Windows 8 / 2012 :  Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled True
Earlier Windows    :  netsh advfirewall set allprofiles state on

It can be useful for troubleshooting test for example to check id it’s firewall related issue.

Basic example:

Disabled

disable-firewall

Enabled

enable-firewall-powershell


previous-buttonnext-button

One thought on “Powershell Tip #64: Enable or Disable the Windows Firewall

  1. Pingback: Powershell Tip #65: Forest and Domain Functional Level | Powershell Guru

Leave a Reply

Your email address will not be published. Required fields are marked *