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:

 

facebooktwittergoogle_plus

3 thoughts on “Get Windows Firewall State on Local or Remote Machine Utilizing Netsh.exe”

  1. I am not able to make this work. Is there more to the command line that is not stated here?

Leave a Reply

Your email address will not be published. Required fields are marked *