Comparing two FIM Sync Services

I’ve been working a lot on config migrations lately – specifically migrating FIM configuration from dev to test to prod. I wanted to be able to easily compare two Sync Service configurations: before a migration to see what the differences are; after a migration to confirm that the servers are now the same; as a record of the before vs after changes on the one server.

So of course I wrote a couple of scripts.

ConvertToCSV-SyncConfig.ps1

The first script takes the name of the folder where you’ve exported a full server config and converts the XMLs to a series of sorted CSV files, which are easier to compare.

.\ConvertToCSV-SyncConfig.ps1 -ServerConfigFolder "E:\fim\DevSvrCfg" -prefix "dev"

SyncCompare1

 

When I convert a second server config folder I use a different prefix so I can tell them apart:

.\ConvertToCSV-SyncConfig.ps1 -ServerConfigFolder "E:\fim\PrdSvrCfg" -prefix "prd"

SyncCompare2

 

CompareCSV-SyncConfig.ps1

The final step is to compare the two sets of CSV files. (And I’ll have to thank Craig Martin here for very handily pointing out the use of Compare-Object right after I’d written the first version of this script to use the old DOS fc command.) The output is one “diff” file for each of the CV files, listing the lines that appear in one CSV but not the other.

.\CompareCSV-SyncConfig.ps1 -prefix1 "dev" -prefix2 "prd"

SyncCompare3

 

To get the scripts

Go to the FIM Team Community Script site and download “Sync Config Comparison.zip”.

About: Carol

I've been doing IT for 30 years, and IdM for 15. I live in Australia and build IdM solutions based on Microsoft Identity Manager. I also play the violin, but that doesn't help much with the IdM solutions.


Leave a Reply

Your email address will not be published. Required fields are marked *


*