1

When I try to use the following Powershell command with a user who exists in the User Profile Database I get the following error:

Move-SPUser : The parameterless Read method can only be used when this instance was initialized with an SPUser object. At line:1 char:12 + Move-SPUser <<<< -Identity "OLD_DOMAIN\OLD_USERNAME" -NewAlias "NEW_DOMAIN\NEW_USERNAME" + CategoryInfo : InvalidData: (Microsoft.Share...PCmdletMoveUser: SPCmdletMoveUser) [Move-SPUser], InvalidOperationException + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletMoveUser

When I attempt to use the following:

$user = Get-SPUser -web http://my.website.url Identity "OLD_DOMAIN\OLD_USERNAME"

I get the following error:

Move-SPUser : At line:1 char:12 + Move-SPUser <<<< -Identity $user -NewAlias > NEW_DOMAIN\NEW_USERNAME + CategoryInfo : InvalidData: > [Move-SPUser], SPException + FullyQualifiedErrorId : > Microsoft.SharePoint.PowerShell.SPCmdletMoveUser

We have completed a domain migration and are now migrating the end users. I have checked the user profile exists but still seeing this error.

2

try this way, i am sure it will work.

$user = Get-SPUser -web http://my.website.url -Identity "OLD_DOMAIN\OLD_USERNAME"

Move-SPUser -IgnoreSID -Identity $user -NewAlias 'NEW_DOMAIN\NEW_USERNAME'
  • I tried this and now get an error which seems to be related to the "NEW_DOMAIN\NEW_USERNAME" part of the command. I updated the question with this information. – motionpotion Oct 1 '15 at 13:46
1

I and my co-worker found that it works better when you pipe Get-SPUser into Move-SPUser:

Get-SPUser -web http://siteURL -Identity "DomainA\UserA" | Move-SPUser -IgnoreSID -NewAlias "DomainB\UserB"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.