Skip to main content

Powershell: Enable Firewall Log

We sometimes need to enable Windows firewall's log to troubleshoot. Here is how.

Check current firewall's settings

Get-NetFirewallProfile

Enable logging blocked connections for Domain profile

Set-NetFirewallProfile -Name Domain -LogBlocked True

Verify settings

Get-NetFirewallProfile -Name Domain

Check the firewall log at %systemroot%\system32\LogFiles\Firewall\pfirewall.log. Remember to run as Administrator.

PS C:\WINDOWS\system32> Get-Content c:\windows\system32\LogFiles\Firewall\pfirewall.log

Popular posts from this blog

MSSQL: Fix error 'Consistency validation for SQL Server registry keys'

While installing Microsof SQL Server 2012, I ran into the following error. "The SQL Server registry keys from a prior installation cannot be modified. To continue, see SQL Server Setup documentation about how to fix registry keys." How to fix Replace the D:\x64\FixSqlRegistryKey_x86.exe file with the original file from the ENU\SQLFULL_ENU.iso file downloading from Microsoft Download Center. This ISO file is 4.2GB. So you can click FixSqlRegistryKey_x86.exe to download this file only. After replacing that file, press Re-run to check. All rules are passed.

chisel: Notes

Linux command: wget

wget - World Wide Web get