Disable Windows Firewall with PowerShell


Easily turn off Windows Firewall with netsh or in the PowerShell

There are still situations where it is necessary to disable the firewall. There are supported methods for this, where the service does not need to be stopped or disabled. On Windows Server 2008 R2 or later, you can disable the firewall from the console using netsh commands. Windows Server 2012 or later also allows the Set-NetFirewallProfile PowerShell cmdlet to run.

Turn off the firewall with Windows PowerShell.

To do this, open Windows PowerShell as an administrator and run the following line:

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

Reactivating the Windows Defender Firewall requires -Enable True instead of False at the end.

This is how you disable the firewall with the netsh command.

Open a command prompt with administrative privileges and insert the following command:

netsh advfirewall set allprofiles state off

How useful was this post?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Leave a Reply

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