Created
April 20, 2017 07:07
-
-
Save darrenjrobinson/b7dc0df1c3eeee9c4e7980db05825855 to your computer and use it in GitHub Desktop.
Gets the Last FIM/MIM MA Run Details, finds the errors associated with Objects that need deleting and deletes them
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import-module LithnetMIISAutomation | |
$lastrun = Get-LastRunDetails -MA "MIM Service" | |
$errors = $lastrun.StepDetails.SynchronizationErrors | |
foreach ($cserror in $errors.ExportErrors){ | |
if ($cserror.ErrorType -eq "failed-creation-via-web-services"){ | |
$objDN = $cserror.DN | |
write-host "DN: " $objDN | |
Get-CSObject -DN $objDN -MA "MIM Service" | Disconnect-CSObject | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment