Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Gets the Last FIM/MIM MA Run Details, finds the errors associated with Objects that need deleting and deletes them
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
You can’t perform that action at this time.