Windows Firewall

List firewall state and current configuration

netsh firewall show state
netsh firewall show config
netsh advfirewall show allprofiles

List the firewall's blocked ports

$f=New-object -comObject HNetCfg.FwPolicy2;$f.rules |  where {$_.action -eq "0"} | select name,applicationname,localports

Disable firewall

We can disable the Firewall using multiple commands:

reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server"  /v fDenyTSConnections /t REG_DWORD /d 0 /f

Last updated