A new hotfix rollup was released on the 11th of March for Microsoft Identity Manager that contains a number of fixes and some new functionality.
One new feature according to the release notes is a new cmdlet Add-MIISADMARunProfileStep
This cmdlet allows the creation of MIM Synchronisation Management Agent Run Profiles using PowerShell.
From the MS Documentation
Add-MIISADMARunProfileStep -MAName ‘AD_MA’ -Partition ‘DC=CONTOSO,DC=COM’ -StepType ‘FI’ -ProfileName ‘ADMA_FULLIMPORT’
Possible values of the StepType parameter (short form or long one can be used):
“FI”, “FULL IMPORT”
“FS”, “FULL SYNCHRONIZATION”
“FIFS”, “FULL IMPORT AND FULL SYNCHRONIZATION”
“FIDS”, “FULL IMPORT AND DELTA SYNCHRONIZATION”
“DI”, “DELTA IMPORT”
“DS”, “DELTA SYNCHRONIZATION”
“DIDS”, “DELTA IMPORT AND DELTA SYNCHRONIZATION”
“EXP”,”EXPORT”
The neat feature of this cmdlet is that it will create the Run Profile if it doesn’t exist.
Cool, so let’s have a play with it. I installed the Rollup on the Synchronisation server in my dev environment. I then went looking for the PS module, and it can’t be seen.
That’s a bit weird. Re-read the release notes. New cmdlet. Ah, maybe the new cmdlet has been added to the old PSSnapIn ?
Yes, there it is. Add-PSSnapin MIIS.MA.Config gives us access to the new cmdlet.
Creating Run Profiles using PowerShell.
Here is a Management Agent from my Dev environment with no Run Profiles configured.
Using ISE I used the new cmdlet to create a Run Profile to run a Stage (Full Import) on the ADMA. Note: You need to put parentheses around the Partition name.
And there you go. The Run Profile didn’t exist so it got created.
A nice enhancement would be if you could create multi-step Run Profiles. That would really save some time, to be able to script that.
Follow Darren on Twitter @darrenjrobinson
You CAN create multi-step profiles if you call the cmdlet multiple times with the same -ProfileName parameter. If it does not exist, it will create it, if it does exist, it will add the step.
Brilliant thx James.