From 1ca78cf5f5610ef05fdd7ed253552453e93c337d Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Wed, 27 Jul 2022 09:37:35 +0200 Subject: [PATCH] Disable deprecated reports if user doesn't ask for them --- Public/Invoke-GPOZaurr.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Public/Invoke-GPOZaurr.ps1 b/Public/Invoke-GPOZaurr.ps1 index cf31435..ab0da6b 100644 --- a/Public/Invoke-GPOZaurr.ps1 +++ b/Public/Invoke-GPOZaurr.ps1 @@ -121,6 +121,11 @@ foreach ($T in $Type) { $Script:GPOConfiguration[$T].Enabled = $true } + } else { + # User didn't choose any types, so we need to exclude types that are deprecated + foreach ($T in @('GPOPermissionsAdministrative', 'GPOPermissionsRead', 'GPOPermissionsRoot', 'GPOPermissionsUnknown')) { + $Script:GPOConfiguration[$T].Enabled = $false + } } # Build data