How is it possible to set a Users Manager attribute from a csv file using FIM cmdlets and Powershell?
Tuesday, November 27, 2012 7:44 AM
We have noticed that our initial Loading of FIM from AD is incomplete.
For Set criteria reasons each FIM user should have a employeeStatus, EmployeeType and Manager.
There are about 170 AD accounts where the User is of 'terminated' status and so the AD account used as FIM Loader has no AD attributes holding status, type or manager data.
What we want to do is to build a simple CSV file, e.g.
and get the FIM cmdlets to process this in a Powershell script, to update the FIM user (and put him in the right Sets!)
What concerns me is the format of the Manager field. There are no examples showing how the Manager attribute is modified via a FIM cmdlet. I am assuming we can provide the DisplayName of the manager in our CSV, but this may be too simplistic.
How have others managed this FIM Manager attribute. I understand that its a special reference type attribute so it may need special treatment by the PS script.
Tuesday, November 27, 2012 10:24 AM
I am still puzzled by this.
The FIM scriptbox example did state that it was only tested on single-valued attributes.
Ultimately I want to drive this function to my update the object imported into FIM:
SetAttribute -object $importObject -attributeName Manager-attributeValue $managerValue
Am I on the right track if I build the variable $managerValue by:
# get manager object from fim from its DisplayName provided by current row in csv file ($manager)
$managerObject = export-fimconfig -uri $URI `
-customconfig "/Person[DisplayName='$manager']" # maybe the EmployeeID or AccountName is a better choice
# its there of course, so
$managerValue = $managerObject.ResourceManagementObject.ObjectIdentifier -replace "urn:uuid:",""
# not sure of the above... but was ripped off an example.
In other words, the Value I am stuffing into the Manager field on my import object is basically the UUID allocated by FIM when the object was created, BUT we strip off the leading "urn:uuid:" characters for some reason.
Is this correct the correct method to update a Manager attribute on a Person resource object????
Tuesday, November 27, 2012 10:44 AMYes, it is the correct approach by quering the uuid first and setting the manager attribute feild
Tracy | Please remember to mark the replies as answers if they help and unmark them if they provide no help.
- Marked As Answer by HaroldHare Tuesday, November 27, 2012 11:33 AM
Tuesday, November 27, 2012 11:36 AM
Thanks. It seems to work ok. I am successfully setting user's Manager attribute correctly.
I guess its one of the many FIM tricks you have to learn... to strip of this urn:uuid: header.