Fix for #647 (GPO issue)
pull/651/head
Romain 2024-07-17 11:07:45 +02:00 committed by GitHub
commit 87715a3275
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 4 deletions

View File

@ -267,8 +267,7 @@ if (Test-Network) {
#Fix and count the array if GPO List as ERROR handling!
if ($GPOList) {
if ($UseWhiteList) {
$WhiteList = $toUpdate.GetUpperBound(0)
if ($null -eq $WhiteList) {
if (-not $toUpdate) {
Write-ToLog "Critical: Whitelist doesn't exist in GPO, exiting..." "Red"
New-Item "$WorkingDir\logs\error.txt" -Value "Whitelist doesn't exist in GPO" -Force
Exit 1
@ -276,8 +275,7 @@ if (Test-Network) {
foreach ($app in $toUpdate) { Write-ToLog "Include app ${app}" }
}
else {
$BlackList = $toSkip.GetUpperBound(0)
if ($null -eq $BlackList) {
if (-not $toSkip) {
Write-ToLog "Critical: Blacklist doesn't exist in GPO, exiting..." "Red"
New-Item "$WorkingDir\logs\error.txt" -Value "Blacklist doesn't exist in GPO" -Force
Exit 1