FIM - How to obtain pending exports from a MA RRS feed

  • General discussion

  • I promised a colleague I would post my script on parsing the "Pending Exports"  from a management agent via the "Log File and Stop" Export run profile.

    The script parses through the XML document and creates a report (which can be loaded into Excel after saving as a CSV) to sort and report on any objects with an EAF or that are being added/deleted/modified in that particular MA.

    This is typically most useful after performing a Full Sync due to deploying a big change, new management agent, adding an attribute-flow, changing precedence or go-live. Since I wanted to explain it more in detail, I posted it on my blog, but feel free to add it to the scriptbox if you think its helpful.

    FIM - Export Pending Changes


    I ended up writing and posting my c# console application in addition to the script, after working on a project with some ECMA. The script can parse the MA Export XML file and the c# console app can parse the CSExport.exe XML file, for more details refer to the blog post. 

    P.S. There may be a few bugs; for those of you that use either the script or program, let me know if you encounter any issues.

    Friday, November 30, 2012 9:21 PM

All replies

  • I wholeheartedly agree with that approach and do much the same -- of course using SQLXML capabilites in SQL Server (I know SQL and runs really fast). When I get a chance I will give this a whirl.

    It looks like this is a nice contribution to the community!

    David Lundell, Get your copy of FIM Best Practices Volume 1

    Wednesday, December 5, 2012 6:41 AM
  • I got a memory error (my XML file was 500MB+)

    Error: Exception of type 'System.OutOfMemoryException' was thrown.

    I tried with and without the showModifications switch.

    csExport doesn't have a notion of -resultSize, so perhaps your parser could?

    Mike Crowley | MVP
    My Blog -- Planet Technologies

    Friday, July 18, 2014 3:01 AM
  • Nice one! I've written something similar and also got some inspiration from Carols scripts and used C# to write the pending export details into a Word document. If you're running live, it's also cool if you can use wmi to grab the operation log that corresponds to the export log and parse that as well so you get a view of any errors that occurred during the export.

    If you're just looking at one pending export as a once off type of thing though, I've found the easiest way to do it is to use Excels (2010) built in xml parser. Just open a new excel doc and drag the xml file on top. You get three options, I use the first and you get a great view with columns that you can filter on. :)

    Friday, July 18, 2014 3:22 AM
  • Mike,

    If the problem is with CSExport generating the file then another approach would be to create an export profile that stops and drops a file. The structure is a little different but very similar.

    If the issue is with using Paul's script to transform it then you could try what Dan says about Excel. I have seen some colleagues get excellent results just dragging the file into Excel.


    David Lundell, Get your copy of FIM Best Practices Volume 1

    Friday, July 18, 2014 9:32 PM
  • I forgot I had that script posted and haven't updated it since I wrote it. I think the XML format from the CSExport utility has changed slightly so i'm not sure how accurate it is. Recently I've created a compiled C# library that will validate the schema against XSD and extract out the different hologram information (pending exports/imports, synchronized data, etc..). The library I'm working on will also help when you have a 1GB+ xml document by parsing through it versus throwing it in memory.

    Wednesday, July 23, 2014 4:52 PM
  • Looking forward to seeing it, thanks Paul!

    Mike Crowley | MVP
    My Blog -- Planet Technologies

    Wednesday, July 23, 2014 8:46 PM