Tag Archives: Windows Firewall

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

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

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

.PARAMETER HOSTNAME
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.

.EXAMPLE
Get-FirewallState -HOSTNAME SERVER01

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

 

Code: