Site Loader

It happens everyone you delete a user and think after words, shit this was not the plan….

You will recreate the user with the same upn and samaccount name. You try to login but that does not work, or all their rights are gone, what to do?
First create a temporary user! Then we use some PowerShell code:

$user = Get-SPUser -Web "http(s)://sharepointsite" -Identity "Domain\DeletedUser" <br/>
Move-SPUser -IgnoreSID $user -newalias "Domain\TempUser" -Confirm:$false

Now all settings form the deleted user are moved to the temp user. Now we have to give the recreated user the rights back!

$user = Get-SPUser -Web "http(s)://sharepointsite" -Identity "Domain\TempUser" <br/>
Move-SPUser -IgnoreSID $user -newalias "Domain\RecreatedUser" -Confirm:$false

It all done!

Sander click to find out more