Using Ryan Newington’s Lithnet FIM PowerShell Module to improve performance of group membership (ComputedMember) reports
In my earlier post about Automatic Group management via the portal (https://blog.oholics.net/fim-2010-automatic-group-management-via-the-portal/), I provided a sample script to get the ComputedMembers of my auto groups:
While this script did the job, it took a rather long time to process, it was an overnight job. If it had failed overnight, I had to wait another day before doing the comparison against production auto groups.
In the August FIM Team User Group, Ryan Newington presented his work – https://youtu.be/3tQzJPi2K7s
I had been planning to try out the PowerShell module (https://lithnetrma.codeplex.com/), so yesterday I got the chance!
Here is the re-written script:
In terms of performance, the Lithnet PowerShell module is much faster. My standard script took ~7 hours to run, while the Lithnet script only took 3 hours!
I can see that I’m going to get a lot more use out of the module in terms of making changes as well as getting information from the portal. Thanks Ryan!
So, as per the comments, Ryan’s suggestion really improves performance of the script! Here is the new script for reference:
Ryan Newington
24th September 2015 @ 9:00 pm
Glad you got a chance to test the module out.
Can’t help but wonder if this would be even faster?
Search-Resources -XPath “/Group[DisplayName = ‘$i’]/ComputedMember” -AttributesToGet @(“AccountName”)
Jon Bryan
25th September 2015 @ 12:04 am
Ryan,
Thanks, yes it is indeed faster!
Against 1 smallish group:
Original script:
24/09/2015 23:36:49
24/09/2015 23:37:03
Your amended script command:
24/09/2015 23:41:23
24/09/2015 23:41:26
Against a much larger group, the result is even more significant:
Original script:
24/09/2015 23:50:19
24/09/2015 23:55:44
Your amended script command:
24/09/2015 23:46:43
24/09/2015 23:47:10
I’ll kick the full job off now, with the amended command, see how much faster it was in the morning….
Many Thanks,
Jon
Jon Bryan
25th September 2015 @ 9:40 am
Ryan,
Wow that is some performance improvement! 7 hours, to 3 hours to 22 minutes! Very impressive 🙂 !
25/09/2015 00:05:21
25/09/2015 00:27:07
Thanks again,
Jon.
Note: Just found that there was a problem with the new script – it was pushing the complete table record for each user to the text file, then the sort operation was trying run against that data – not very useful output gained and a lot more work to do!
I have updated the script and now the time to get the data for all those groups is 6 minutes! Amazing!
25/09/2015 11:19:20
25/09/2015 11:25:27
Ryan Newington
9th October 2015 @ 9:29 pm
Didn’t see this comment until now. What a great result! 7 hours -> 6 minutes! 70 times faster!
Jon Bryan
9th October 2015 @ 9:35 pm
Yes, pretty impressive!