Sometimes you think you understand something just fine – until it stops working, and then you realise you didn’t have a clue. So it was with me and the “Return” statement in PowerShell functions
Category: Scripting
Breaking down the size of a FIM Service query with PowerShell
When trying to perform bulk operations against objects in FIM from PowerShell you can run into some pretty slow and heavy going queries. This little snippet shows how you can loop through each letter of the alphabet as a way to reduce the size of the batch of objects you deal with in one go.
Scheduled notifications from the FIM Portal
I was asked today to implement notification emails on changes to certain groups. Like many situations with the FIM Portal this turned out to be trickier than expected. A number of the groups are criteria-based so don’t actually have a member attribute as such. With no member-update request happening there’s nothing to actually trigger a…
Querying FIM WMI metrics with PowerShell
There has been a WMI way to get info about the Sync service, MAs and connector space objects since the MIIS days. There used to be a bunch of vbscript samples on TechNet but I’ve never seen them updated for PowerShell. The other day I wanted to produce a report of MA stats and thought…
Using PowerShell to query Request objects
I’ve been finding it useful to query Request objects for various reasons, mostly to get pending or historical changes out of them. This post contains a few script snippets and examples. Note I have developed and used these on FIM 2010 R2 only.
Removing a reference value
I needed to delete all the Managers from people in the FIM Portal where a particular Manager was set. I had blithely assumed this would be easy with the FIM PowerShell plugin – sadly, not so.
FIM Best Practice: Use PowerShell
I’ve had this post sitting in draft for a long time and for some reason hadn’t posted it yet – but then today my colleague Matt sent me a link to the Scripting Guy’s PowerShell Holiday Gift Guide. Yes I do love my PowerShell (and I’m hoping that Santa will bring me a copy of…
Adding and removing the same value from a multivalued property
For some reason I had assumed that I wouldn’t be able to remove and re-add the same value to a multivalued property in the same request – but it turns out you can – and it helped me greatly simplify a script, so hooray for that!
WorkflowInstance could not resolve any of the defined approvers: ‘[//WorkflowData/ApproverID];’
I’ve been trying to pass an ObjectID to the Approval activity via a WorkflowData parameter generated in the FIM PowerShell Activity but I had quite a bit of trouble getting the format right.
FIM Best Practice: Clear Run History but keep Import and Export logs
Run History should be regularly cleared to keep your database file sizes under control. There’s also not a lot of point keeping weeks (let alone months or years) worth of run history in the Sync Service. It shows when profiles ran and whether there were any errors, but click on a CS object and you…