How can I copy the value of one user property to another in SharePoint? We have a custom property called Supervisor which will be entered by the user and I want to copy this property into the Manager field in SharePoint, as the organizational profile is not working without the manager field. I am writing this in PowerShell but it is giving me the following error “Unable to index into an object of type Microsoft.Office.Server.UserProfiles.UserProfile.” My Code is

$consultantsupername = $userProfile["ConsultantSupervisor"]
$Managername =$userProfile["Manager"]

Please help me… Thanks

1 Answer 1


You're forgetting the .Value portion... Check out line 31 of this guy's code:


  • Thank you ..That worked beautifully .I have one more question so now i am seeing the change in the manager field but still it is not updating organizational browser .Is there something i am missing????
    – Anil
    Apr 23, 2012 at 18:40
  • Have you synced the User Profile Service? Apr 23, 2012 at 18:47
  • Yes i performed an incremental sync ..do i need to perform a full sync ??
    – Anil
    Apr 23, 2012 at 18:51
  • I don't know what to tell you, it might be a Silverlight thing (try clearing the cache?). If that doesn't work, I'd suggest starting a new thread. Apr 23, 2012 at 18:53
  • Actually it worked i think we have to wait for 10 min even afer the sync was performed thanks .,..
    – Anil
    Apr 23, 2012 at 18:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.