0

Our company is changing everyone's AD user account from numeric to alpha or alphanumeric. The move-spuser command will not work because account 4510014 is now jasmith. 4510014 will fail because they are changing the account in AD. How do i do this change in SharePoint so user's permissions and mysite can reflect their new ID.

Kevin Short
  • 413
  • 1
  • 8
  • 19
  • Have you looked at http://blogs.technet.com/b/sheyia/archive/2014/05/22/sharepoint-mysites-and-ad-domain-migrations-how-to-make-it-happen-smoothly.aspx – Per Jakobsen Apr 12 '16 at 18:38
  • Thanks for sharing the article. I appreciate it. I will use migrate user instead of move-spuser. I will update this post with my test outcome. – Kevin Short Apr 12 '16 at 19:11

1 Answers1

0

This will work:

$user = Get-SPUser -Identity "i:0#.w|domain\4510014" -Web http://webUrl
Move-SPUser -Identity $user -NewAlias "domain\jasmith" -IgnoreSid

Note that Move-SPUser and stsadm -o migrateuser run the exact same function.

  • This works however in SP 2010 mysite url did not change the http://mysite.company.gv/person/4510014 to http://mysite.company.gv/person/jasmith. However it changed the url to new id (http://mysite.company.gv/personal/domain_jasmith). Is there any reason why 2010 would not change the url? Please suggest. – Kevin Short Apr 14 '16 at 14:27
  • UPSA does have logic to change the URL when the sAMAccountName changes. My assumption is you have the option 'Domain and user name (will not have conflicts)' configured in Set up MySites in the UPSA. –  Apr 14 '16 at 15:07
  • both stsadm migrate user or move-spuser works in 2013 . but for some reason it does not change the url for the myside in 2010. myside setup looks right to me. any idea. is there additional user profile command i can run subsequently to change the mysite url – Kevin Short Apr 15 '16 at 19:01
  • Change the format of the URL in Set Up MySites in the UPA. It will transition the sites URL gradually. –  Apr 15 '16 at 19:57
  • In SP2010 I have my site url just to be username (without domain). In UPS "User name (resolve conflicts by using domain_username) Example: .../username/ or .../domain_username/" this option is checked. – Kevin Short Apr 19 '16 at 13:03
  • And if you change that option to say "domain with username (no conflicts)", it will migrate the Site Collections to the new URL format. –  Apr 19 '16 at 13:05
  • But that option will use domain_username instead of username format. I guess I am okay with that. But it change existing users mysite path to domain_username or only for the one that I use move-spuser? – Kevin Short Apr 19 '16 at 14:07
  • Trevor, I made the change you suggested in SharePoint 2010 and ran move-spuser. It did not change the url for the user's mysite. – Kevin Short Apr 20 '16 at 12:05