From 705c92cf2257d3e315dab1c5ecac09d5a6896ba4 Mon Sep 17 00:00:00 2001 From: "Eilay Yosfan (DFIR)" Date: Mon, 5 Feb 2024 11:46:35 +0200 Subject: [PATCH] change --- .../03-Features/06-GeneralActivity.ps1 | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/02-LogModules/Auth.Log/03-Features/06-GeneralActivity.ps1 b/02-LogModules/Auth.Log/03-Features/06-GeneralActivity.ps1 index b2559df..fc1a01e 100644 --- a/02-LogModules/Auth.Log/03-Features/06-GeneralActivity.ps1 +++ b/02-LogModules/Auth.Log/03-Features/06-GeneralActivity.ps1 @@ -23,9 +23,21 @@ foreach ($SingleLine in $AuthLogCopyContent) { # print out the Power Button activity if ($PowerButton_Count -ge 1) { Write-Output "" -Write-Output "Machine Shutdown By Power Button" -Write-Output "+------------------------------+" -$GeneralActivity_HT["PowerButton"] +Write-Output "Machine Shutdown By Power Button - Raw Events" + +# variable to cretae the amount of spaces needed for the table +$MaxLength = ($GeneralActivity_HT["PowerButton"] | Measure-Object Length -Maximum).Maximum + +# variable to story the new amount of hyfens +$Border = '-' * $MaxLength + + foreach ($Event in $GeneralActivity_HT["PowerButton"]) { + + Write-Output "+$Border+" + Write-Output "|$Event|" + + } + Write-Output "+$Border+" } # reset