In sharepoint 2013 i need to replace a user by an other. For this i use:

Move-SPUser -Identity "DOMAIN\JaneDoe" -NewAlias "Domain\JaneSmith" -IgnoreSID

I give permission on a site to JaneDoe puting him in a group. After executing the command the user is remove from the group so he doesn't have anymore access but new user doesn't have access in his place! If i get the permission again to JaneDoe his name is now JaneSmith

Could you give me a sample to replace a user by an other like stsadm -o migrateuser in SP2007


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

1 Answer 1


The proper use of this cmdlet is:

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

The Get-SPUser example is using Windows Claims (drop the i:0#.w| if not using Windows Claims) and the -Web is a Site Collection where the user is present in the User Information List.

  • Thanks Effectively i retrieve user and then i use move-spuser as you did but the result is the same. It removes old user permission but doesn't give permission to the new one Apr 6, 2016 at 20:11
  • Get the new user into the $user variable using the same method about and validate the SystemUserKey matches the SID of the object in Active Directory.
    – user6024
    Apr 6, 2016 at 20:12
  • I had to add " :i:0#.w|" before login name in parameter -NewAlias Apr 7, 2016 at 10:02

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.