From 9fe0157293814a17c5701cb6dc7f5950f2fe5ac9 Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Thu, 13 Aug 2020 13:34:03 +0200 Subject: [PATCH] Update --- Public/Invoke-GPOZaurr.ps1 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Public/Invoke-GPOZaurr.ps1 b/Public/Invoke-GPOZaurr.ps1 index 0fd3e96..2bc910d 100644 --- a/Public/Invoke-GPOZaurr.ps1 +++ b/Public/Invoke-GPOZaurr.ps1 @@ -192,13 +192,15 @@ # to make sure all objects are having same (even empty) properties we "normalize" it if (-not $SkipNormalize) { foreach ($Report in [string[]] $Output['Reports'].Keys) { - $Properties = $Output['Reports'][$Report] | Select-Properties -ExcludeProperty DisplayName, DomainName, GUID, GpoType, Linked, LinksCount, Links -AllProperties -WarningAction SilentlyContinue + $FirstProperties = 'DisplayName', 'DomainName', 'GUID', 'GpoType' + $EndProperties = 'CreatedTime', 'ModifiedTime', 'ReadTime', 'Filters', 'Linked', 'LinksCount', 'Links' + $Properties = $Output['Reports'][$Report] | Select-Properties -ExcludeProperty $EndProperties -AllProperties -WarningAction SilentlyContinue $DisplayProperties = @( - 'DisplayName', 'DomainName', 'GUID', 'GpoType' + $FirstProperties foreach ($Property in $Properties) { $Property } - 'Linked', 'LinksCount', 'Links' + $EndProperties ) $Output['Reports'][$Report] = $Output['Reports'][$Report] | Select-Object -Property $DisplayProperties }