From c7d81b75a11d897fdfd0212e2454865723f25bd9 Mon Sep 17 00:00:00 2001 From: Thumbscrew Date: Tue, 5 Nov 2019 20:36:08 +0000 Subject: [PATCH] Created format ps1xml. Needs tweaking some more. --- PSWinFW.psd1 | Bin 8068 -> 8138 bytes formats/FirewallEvent.Format.ps1xml | 75 ++++++++++++++++++++++++++++ public/Get-PSFirewallLog.ps1 | 2 + 3 files changed, 77 insertions(+) create mode 100644 formats/FirewallEvent.Format.ps1xml diff --git a/PSWinFW.psd1 b/PSWinFW.psd1 index 128309da12abeed4c76b884841024de456cf5a1f..926927d51623d54a2e40b8f41c2c71eb8a3c89be 100644 GIT binary patch delta 90 zcmZp%KV`q+1pnkS{92ys3~3Dc3`GpN42cXS48;sF3~mgWKz=GiIZz}A2wfSY%G&K_<1H@;g_4-$IG|bOQ3-t0HNm!0{{R3 diff --git a/formats/FirewallEvent.Format.ps1xml b/formats/FirewallEvent.Format.ps1xml new file mode 100644 index 0000000..223ff5a --- /dev/null +++ b/formats/FirewallEvent.Format.ps1xml @@ -0,0 +1,75 @@ + + + + + FirewallEvent + + PSWinFW.Log.Event + + + + + 10 + + + 8 + + + 5 + + + 4 + + + + + 5 + + + 5 + + + + 7 + + + + + + + Date + + + Time + + + Action + + + Protocol + + + SourceIP + + + DestinationIP + + + SourcePort + + + DestinationPort + + + Size + + + Path + + + + + + + + \ No newline at end of file diff --git a/public/Get-PSFirewallLog.ps1 b/public/Get-PSFirewallLog.ps1 index e55e033..d406ee3 100644 --- a/public/Get-PSFirewallLog.ps1 +++ b/public/Get-PSFirewallLog.ps1 @@ -134,6 +134,8 @@ function Get-PSFirewallLog { $fwEvent | Add-Member NoteProperty -Name $member.Name -Value $split[$member.Value] } + $fwEvent.pstypenames.insert(0, 'PSWinFW.Log.Event') + $fwEvent } }