automating the Set-SPUser powershell command RRS feed

  • Question

  • I'm pretty much a newbie when it comes to Sharepoint administration, but I recently came across an issue with a user in our extranet domain that changed her last name. I made the necessary changes in AD and ran a profile sync in Sharepoint. I thought Sharepoint would display her new last name but for some reason the tp_Title in SQL didn't reflect this name change. So after some research I found out that you need to use the Set-SPUser command within the Sharepoint Management shell to make the new name reflect in Sharepoint.

    I'm wondering if there's a way to automate this? Does anyone have any thoughts? Thank you.

    Wednesday, July 27, 2011 10:44 PM


  • Hi PDCSchrammie,


    Thanks for your post.

    As I understand, some user’s information was updated in the AD. And you have synced  the user Profile Service in SharePoint 2010. But the user’s information still wasn’t right in the site, am I right?


    First, you can create a Custom Timer job or Windows schedule task to run the command every day. In the project, you can check which one’s information is changed in the AD before updating it;

    Second, have you checked whether the information is synced in the User Profiled Service? Is it correct or not?

    Third, there is also a hidden list “ User Information List” in SharePoint site. You can get more information here :


    Friday, July 29, 2011 9:40 AM