From 4419df1e5b8a8f6871a5d1044d4821f3aef2da29 Mon Sep 17 00:00:00 2001 From: Thumbscrew Date: Wed, 6 Nov 2019 19:35:16 +0000 Subject: [PATCH] Adjusted Table width, added labels. Removed Include switches as no longer required. --- PSWinFW.psd1 | Bin 8138 -> 8186 bytes formats/FirewallEvent.Format.ps1xml | 5 ++- public/Get-PSFirewallLog.ps1 | 49 +++++----------------------- 3 files changed, 12 insertions(+), 42 deletions(-) diff --git a/PSWinFW.psd1 b/PSWinFW.psd1 index 926927d51623d54a2e40b8f41c2c71eb8a3c89be..f19fb4bb23bcffa1af9c3dc2b5f63ef5a86a9ec0 100644 GIT binary patch delta 117 zcmX?Q|I28 - 5 + 6 + 4 + 5 + 5 diff --git a/public/Get-PSFirewallLog.ps1 b/public/Get-PSFirewallLog.ps1 index d406ee3..a3f4d9b 100644 --- a/public/Get-PSFirewallLog.ps1 +++ b/public/Get-PSFirewallLog.ps1 @@ -28,21 +28,6 @@ function Get-PSFirewallLog { [int] $Tail = 0, - # Include extended TCP information (TCP Flags, TCP Sequence Number, TCP ACK Number, TCP Window Size). Defaults to false. - [Parameter(Mandatory = $false)] - [switch] - $IncludeTcpInfo, - - # Include extended ICMP information (ICMP Type and Code). Defaults to false. - [Parameter(Mandatory = $false)] - [switch] - $IncludeIcmpInfo, - - # Include Info field. Defaults to false. - [Parameter(Mandatory = $false)] - [switch] - $IncludeInfo, - # ComputerName to retrieve log from [Parameter(Mandatory = $false, ParameterSetName = 'remote')] [string] @@ -96,34 +81,16 @@ function Get-PSFirewallLog { "SourcePort" = 6 "DestinationPort" = 7 "Size" = 8 + "TcpFlags" = 9 + "TcpSyn" = 10 + "TcpAck" = 11 + "TcpWin" = 12 + "IcmpType" = 13 + "IcmpCode" = 14 + "Info" = 15 + "Path" = 16 } - if($IncludeTcpInfo) { - $tcpMembers = @{ - "TcpFlags" = 9 - "TcpSyn" = 10 - "TcpAck" = 11 - "TcpWin" = 12 - } - - $members += $tcpMembers - } - - if($IncludeIcmpInfo) { - $icmpMembers = @{ - "IcmpType" = 13 - "IcmpCode" = 14 - } - - $members += $icmpMembers - } - - if($IncludeInfo) { - $members += @{ "Info" = 15 } - } - - $members += @{ "Path" = 16 } - $log | ForEach-Object { $line = $_ $split = $line -split ('\s')