Tag Archives: Netsh.exe

Get Windows Firewall State on Local or Remote Machine Utilizing Netsh.exe

Displays the Windows Firewall state forĀ Domain, Private, and Public profiles on local or remote computer.

UseĀ Get-FirewallState to show current Firewall state that is presented on the Windows Firewall with Advanced Security Properties page, with the tabs for Domain, Private, and Public profiles.

Specifies the remote or local computer name.
When using HOSTNAME parameter, Windows PowerShell creates a temporary connection that is used only to run the specified command and is then closed.

Get-FirewallState -HOSTNAME SERVER01

The script will establish remote connection to SERVER01 machine and display the Firewall state for all profiles: