skip to Main Content

Disable Windows Firewall with PowerShell

How to disable the Windows Firewall with PowerShell in Windows Server 2012/2016/2019? I don’t recommend turning off the Windows Firewall with PowerShell. But if you have a test lab and you want to disable it for testing, go ahead. Don’t forget to enable the Firewall when you finished testing. In this article, you will learn how to disable the Firewall with PowerShell.

Windows Firewall profiles information

Windows Firewall offers three firewall profiles:

  • Domain profile: applies to networks where the host system can authenticate to a domain controller.
  • Private profile: a user-assigned profile and is used to designate private or home networks.
  • Public profile: this is the default profile. It is used to designate public networks such as Wi-Fi hotspots at coffee shops, airports, and other locations.

Get status of the Windows Firewall with PowerShell

First, let’s get the current status of the Windows Firewall. We will be using the Get-NetFirewallProfile cmdlet.

We have three profiles: Domain, Name, and Public. Windows Firewall is enabled on all three profiles.

Disable Windows Firewall with PowerShell Windows Firewall is on

In the next step, we are going to disable the Windows Firewall.

Disable Windows Firewall in Windows Server 2012/2016/2019

Disable Windows Firewall on all three profiles.

Check Windows Firewall status

Check the status after you disable the Firewall on all three profiles. Run the Get-NetFirewallProfile cmdlet.

Disable Windows Firewall with PowerShell Windows Firewall is off

Windows Firewall is disabled on all three profiles in Windows Server. Have fun testing. Don’t forget to enable the Windows Firewall after you finished troubleshooting or testing. It’s important to keep the Windows Firewall turned on.

Conclusion

In this article, you did learn how to disable the Firewall in Windows Server 2012/2016/2019. First, get the current status of the Windows Firewall. After that, disable the Windows Firewall with PowerShell. Did you enjoy this article? If so, you may like Configure autodiscover URL in Exchange with PowerShell. Don’t forget to follow us and share this article.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect and IT Consultant. His specialism is designing and building complex enterprise environments. He started Information Technology at a very young age, and his goal is to teach and inspire others. Connect with ALI TAJRAN on social media. Read more »

This Post Has One Comment

Leave a Reply

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

Back To Top