# Firewall

Windows Firewall offers three firewall profiles:<span class="ezoic-adpicker-ad" id="bkmrk-"></span>

- **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.

## <span class="ez-toc-section" id="bkmrk--0"></span>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](https://docs.microsoft.com/en-us/powershell/module/netsecurity/get-netfirewallprofile?view=win10-ps) cmdlet.

<div id="bkmrk-ps-c%3A%5C%3E-get-netfirew">```powershell
<span class="token function">PS</span> C:\> Get<span class="token operator">-</span>NetFirewallProfile <span class="token punctuation">|</span> <span class="token function">Format-Table</span> Name<span class="token punctuation">,</span> Enabled

Name    Enabled
<span class="token operator">--</span>-<span class="token operator">-</span>    <span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span>
Domain     True
Private    True
Public     True
```

<div><div><button type="button">Copy</button></div></div></div>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.

<div id="bkmrk-ps-c%3A%5C%3E-set-netfirew">```powershell
<span class="token function">PS</span> C:\> <span class="token function">Set</span><span class="token operator">-</span>NetFirewallProfile <span class="token operator">-</span>Profile Domain<span class="token punctuation">,</span> Public<span class="token punctuation">,</span> Private <span class="token operator">-</span>Enabled False
```

<div><div><button type="button">Copy</button></div></div></div>## <span class="ez-toc-section" id="bkmrk--1"></span>Check Windows Firewall status

Check the status after you disable the Firewall on all three profiles. Run the **Get-NetFirewallProfile** cmdlet.<span class="ezoic-adpicker-ad" id="bkmrk--2"></span>

<div id="bkmrk-ps-c%3A%5C%3E-get-netfirew-0">```powershell
<span class="token function">PS</span> C:\> Get<span class="token operator">-</span>NetFirewallProfile <span class="token punctuation">|</span> <span class="token function">Format-Table</span> Name<span class="token punctuation">,</span> Enabled

Name    Enabled
<span class="token operator">--</span>-<span class="token operator">-</span>    <span class="token operator">--</span>-<span class="token operator">--</span>-<span class="token operator">-</span>
Domain    False
Private   False
Public    False
```

</div>