Skip to content

Instantly share code, notes, and snippets.

View kyouheicf's full-sized avatar
🍊

kyouheicf

🍊
  • 01:57 (UTC +09:00)
View GitHub Profile
@kyouheicf
kyouheicf / tail-windows-firewall-defender-log.ps1
Created May 8, 2024 16:32 — forked from cameronkerrnz/tail-windows-firewall-defender-log.ps1
Tail and Filter Windows Firewall Log (like tail -f ... | awk)
Get-Content -Head 5 C:\Windows\System32\LogFiles\Filrewall\pfirewall.log
Get-Content -Wait -Tail 5 C:\Windows\System32\LogFiles\Filrewall\pfirewall.log | % {
do {
$a=$_.split(' ')
# DROP or ACCEPT (the only values AFAIK)
#
if ($a[2] -ne 'DROP') {continue}