I have been trying to get for Documentation purposes a matrix of MPRS / Sets / Workflows. There is a script "How to Use PowerShell to Export all MPRs into a Gridview (or Excel) for Documentation" already in the FIM cmdlets HowTo which is more or less what I need but uses the QUEST set of cmdlets which I do not have.
When I get my MPR object and look at the the PrincipalSet attribute for example, I get a value like urn:uuid:8887df8e-6e84-49f2-a794-f9e9802077e0
I take this to be the ObjectID of the PrincipalSet.
Wonderful. I am having great difficulties using this string.
When I look around TechNet there is a function called GetResource which is:
GetResource Function
This is an example of a Windows PowerShell function that uses the Import-FIMConfig cmdlet to query the FIM Service database for a resource based on theObjectID. If the query is successful, the function returns a reference to the resource. If no such object is found, the function writes a message to the Windows PowerShell host.
$DefaultUri="http://localhost:5725"function GetResource { PARAM($ObjectIdentifier, $Uri=$DefaultUri) END {$object= Export-FIMConfig -CustomConfig [System.String]::Format("*[ObjectID='{0}']", $ObjectIdentifier) -Uri $Uriif($object-eq$null) { Write-Host "Object was not found." }else {$object } } }
Looks good, no example though, no typing either. I guessed $ObjectIdentifier is the value of the ObjectID attribute e.g.
urn:uuid:8887df8e-6e84-49f2-a794-f9e9802077e0
but when I try it, the function just laughs at me and complains about the filter.
How do I use this function to dereference the Set's ObjectID given to be from the MPR object?????