Home > SharePoint 2010 > Move-SPUser common errors

Move-SPUser common errors


There is something great with ladies: they change their name when get married .There is something SharePoint do not like: when people change their Name…

When user change their AccountName, SharePoint do not “see” it very well. You have to use the Move-SPUser cmdlet (or stsadm –o migrateuser for Moss 2007)

Technet documentation (Here) give this example:

Move-SPUser –Identity “DOMAIN\JaneDoe” –NewAlias “Domain\JaneSmith”

But if you try it, this command fails. Because the identity parameter shall not be a String, but an SPUser object. Instead try this:

$user= Get-SPUser -Identity <LoginName> -Web <A WebSite in your Farm>
Move-SPUser –Identity $user –NewAlias “Domain\newLogin” -IgnoreSID

And if this command fails in a “User unknown” error, you should try to launch it under Identity Account.

To sum-up:

  1. Log as Identiy Account
  2. Do a get-SPUser first

Thanks to http://social.technet.microsoft.com/Forums/en-US/sharepoint2010setup/thread/92e515a0-7b4f-4597-95ba-ec640810ac0c

Advertisements
Categories: SharePoint 2010
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: