Firewall Management On Window Nano Server 2016

In this article I’ll show you how to manage the Firewall on Windows Nano Server 2016 using PowerShell.

Up until now I have told people to disable the Firewall when setting up Nano Server and once they done they can configure the firewall.

Today I’ll show the basic cmdlets to manage the firewall, to get started I’ll connect to my Nano Server using PowerShell Remote.

Once connected I’ll use the cmdlet below to view which Firewall profile s enabled:

Get-NetFirewallProfile | select name, enabled

To enable a Firewall Profile I can use:

Set-NetFirewallProfile domain -Enabled True
Set-NetFirewallProfile private -Enabled True
Set-NetFirewallProfile public -Enabled True

To disable a Firewall profile I can use:

Set-NetFirewallProfile domain -Enabled True
Set-NetFirewallProfile private -Enabled True
Set-NetFirewallProfile public -Enabled True

To view which ports are enabled or Disabled use:

Get-NetFirewallRule |ft

The important value Is the above cmdlet Is the Enabled section:

True = Allowed
False = Blocked

Leave a Reply