From 81eaac3fd122b7848325dd912f2eb235089c08cb Mon Sep 17 00:00:00 2001 From: Przemyslaw Klys Date: Sat, 16 Sep 2023 09:42:09 +0200 Subject: [PATCH] Small improvements to the report #48 --- Private/Invoke.GPOZaurrGPORedirects.ps1 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Private/Invoke.GPOZaurrGPORedirects.ps1 b/Private/Invoke.GPOZaurrGPORedirects.ps1 index 394ce83..e074215 100644 --- a/Private/Invoke.GPOZaurrGPORedirects.ps1 +++ b/Private/Invoke.GPOZaurrGPORedirects.ps1 @@ -1,7 +1,7 @@ $GPOZaurrGPORedirects = [ordered] @{ Name = 'Group Policies With Redirected SYSVOL' Enabled = $false - Action = $null + ActionRequired = $null Data = $null Execute = { Get-GPOZaurrRedirect -Forest $Forest -IncludeDomains $IncludeDomains -ExcludeDomains $ExcludeDomains @@ -15,6 +15,11 @@ $Script:Reporting['GPORedirect']['Variables']['GPOIsNotCorrect']++ } } + if ($Script:Reporting['GPORedirect']['Variables']['GPOIsNotCorrect'] -gt 0) { + $Script:Reporting['GPORedirect']['ActionRequired'] = $true + } else { + $Script:Reporting['GPORedirect']['ActionRequired'] = $false + } } Variables = @{ GPOTotal = 0