This commit is contained in:
Przemyslaw Klys
2020-11-18 21:37:20 +01:00
parent 807ea420b0
commit 63ab1b571d
2 changed files with 3 additions and 2 deletions
+2 -1
View File
@@ -35,7 +35,7 @@
} | Select-Object | Select-Object -First $LimitProcessing | ForEach-Object {
$GPO = $_
if ($GPO.Status -eq 'Not available in AD') {
Write-Verbose "Remove-GPOZaurrBroken - Processing $($GPO.Path)"
Write-Verbose "Remove-GPOZaurrBroken - Processing [AD] $($GPO.Path)"
if ($BackupFinalPath) {
Try {
Write-Verbose "Remove-GPOZaurrBroken - Backing up $($GPO.Path)"
@@ -55,6 +55,7 @@
}
}
} elseif ($GPO.Status -eq 'Not available on SYSVOL') {
Write-Verbose "Remove-GPOZaurrBroken - Processing [SYSVOL] $($GPO.DistinguishedName)"
try {
$ExistingObject = Get-ADObject -Identity $GPO.DistinguishedName -Server $GPO.DomainName -ErrorAction Stop
} catch {