Tuesday, August 03, 2010

Sync and Merge

Doing a lot of Synchronization consolidation lately. 

It makes me really appreciate the FIM Configuration Migration PowerShell Cmdlets, which do the following:

  1. Import (Source)
  2. Import (Target)
  3. Diff (Join/Match)
  4. Merge (Export)

The FIM Configuration Migration Cmdlets are a lot more work than what we have in FIM Sync, which boils down to:

  1. Export
  2. Import

The problem is that there is a lot less functionality in the FIM Sync configuration tools (basically just Import/Export).  To fill the gaps I’ve had to do a lot of PowerShell scripting to perform the Sync configuration diff/merge work.  It has been really interesting, and the most challenging part has revolved around the use of the PowerShell Compare-Object cmdlet. 

The PowerShell Compare-Object cmdlet is REALLY useful but doesn’t treat all object types equally.  When simply comparing string arrays it works really well, but venture into other object types such as XML nodes and the results haven’t been predictable for me.  I’ve resorted to comparing String arrays, then using Select-XML to get the things I’m trying to merge.  A couple more steps, but the scripts work a lot better.

The moral of the story is: at first the FIM Configuration Migration Cmdlets seem to be a pain but the extra functionality will go a LONG way, especially when they are able to reach deeper into the FIM Sync Service.

No comments: