Extract User details from the Export Errors of the Cloud connector in AD Connect

Ajay JoshiAjay Joshi
2 min read

We can get a list of affected users from the Cloud connector's Export errors using this method which requires manipulation in both XML(in PowerShell) & Excel.

Usually, we export the errors using the CSExport tool in PowerShell:-

cd "C:\Program Files\Microsoft Azure AD Sync\bin"

.\CSExport.exe “Cloud Connector” Errors-Export.xml /f:x

This XML file is not directly readable or easy to extract the values from and there is another in-built AD Connect tool CSExportAnalyzer which we can use to convert this XML to CSV:-

.\CSExportAnalyzer.exe Errors-Export.xml > Errors-Export.csv

But this CSV won't have any useful User parameters from either local AD or AAD. It only gives you the Cloud Connector's DN of the specific user and the error statement is also not given. Hence, we can use the below steps for extracting the relevant User info.

1) Load the XML into a PS variable:-

[XML]$ErrorsCloud = Get-Content .\Errors-Cloud.xml

2) Export it into a Txt file, exporting to CSV won't work here:-

$ErrorsCloud.'cs-objects'.'cs-object'.'synchronized-hologram'.'entry'.'attr'.'value' >> Errors-Cloud.txt

3) Then load the Txt file into an Excel file using Data tab >> From Text/CSV option and filter out the SMTP values, there will be multiple as both SMTP & smtp are present. Then we can further manipulate and get a single entry for each user.

This approach will only provide the list of Users with Export errors. Will share the method to extract the complete report with corresponding error details very soon.

1
Subscribe to my newsletter

Read articles from Ajay Joshi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Ajay Joshi
Ajay Joshi