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.
-
Have you looked at blogs.technet.com/b/sheyia/archive/2014/05/22/…– Per JakobsenApr 12, 2016 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 ShortApr 12, 2016 at 19:11
1 Answer
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 mysite.company.gv/person/4510014 to mysite.company.gv/person/jasmith. However it changed the url to new id (mysite.company.gv/personal/domain_jasmith). Is there any reason why 2010 would not change the url? Please suggest. Apr 14, 2016 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.– Trevor Seward ♦Apr 14, 2016 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 Apr 15, 2016 at 19:01
-
Change the format of the URL in Set Up MySites in the UPA. It will transition the sites URL gradually.– Trevor Seward ♦Apr 15, 2016 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. Apr 19, 2016 at 13:03