Firewall

Windows Firewall offers three firewall profiles:

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.

PS C:\> Get-NetFirewallProfile | Format-Table Name, Enabled

Name    Enabled
----    -------
Domain     True
Private    True
Public     True

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

 

Disable Windows Firewall in Windows Server 2012/2016/2019

Disable Windows Firewall on all three profiles.

PS C:\> Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False

Check Windows Firewall status

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

PS C:\> Get-NetFirewallProfile | Format-Table Name, Enabled

Name    Enabled
----    -------
Domain    False
Private   False
Public    False

Revision #4
Created 30 June 2021 07:43:37 by Alois
Updated 30 June 2021 07:46:58 by Alois