There are many ways to disable Windows Firewall in Windows Server 2016. Depending on the version of the Server, such as GUI, Core or Nano Server, you will need to apply one of the following methods to achieve this.
Disable Firewall from the GUI
Open the Control Panel, go to System and Security, and then click Windows Firewall. Here, click Turn Windows Firewall on or off.
At this point, you can disable the Windows Firewall for the three network types such as Domain, Private, and Public, by enabling the Turn Off Windows Firewall option (not recommended) for each network type.
Disable Firewall from PowerShell
First, it’s a good idea to know the current status of the Firewall on the server by typing the following command.
To disable Firewall for all network types, run the following cmdlet.
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled False
To reactivate it, run the following cmdlet.
Set-NetFirewallProfile -Profile Domain, Public, Private -Enabled True
Disable Firewall from the Command Prompt
To disable Firewall for all network types, type the following command.
netsh advfirewall set allprofiles state off
To re-enable the Firewall, type the following command.
netsh advfirewall set allprofiles state on