none
Move-SPUser : The specified user or domain group was not found.

    Question

  • I'm trying to migrate users in a legacy 2007 content database, using a standalone authentication system, to a new 2013 farm using AD.  I've already migrated the content database and its content displays without issue in the new 2013.  Legacy users have this format:

    i:0#.f|OLDDOMAIN|First.Last

    And I need to migrate them to the new format:

    i:0#.w|NEWDOMAIN\First.Last

    To test this, I ran:

    $User1=Get-SPUser -Identity "i:0#.f|OLDDOMAIN|First.Last" -Web "[URL for New 2013 web app]"
    Move-SPUser -Identity $User1 -NewAlias "i:0#.w|NEWDOMAIN\First.Last" -IgnoreSID -Confirm:$false

    However, the result was:

    Move-SPUser : The specified user or domain group was not found. At line:1 char:1 + Move-SPUser -Identity $User1 -NewAlias "i:0#.w|NEWDOMAIN\First.Last" -IgnoreSID -con...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidData: (Microsoft.Share...PCmdletMoveUser:SPCmdletMoveUser) [Move-SPUser], SPExcep tion + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletMoveUser

    I've verified that $User1 contains a valid identity by running $User1 by itself: it returns the user. So, it's unclear to me why this error is being returned.  What am I missing?

    Thursday, June 11, 2015 4:13 PM

Answers

  • Just do "NEWDOMAIN\First.Last" instead on your Move-SPUser.

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Marked as answer by Stephan Bren Thursday, June 11, 2015 4:49 PM
    Thursday, June 11, 2015 4:16 PM
    Moderator
  • Yes, the user must exist in Active Directory first.

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Marked as answer by Stephan Bren Thursday, June 11, 2015 4:49 PM
    Thursday, June 11, 2015 4:27 PM
    Moderator

All replies

  • Just do "NEWDOMAIN\First.Last" instead on your Move-SPUser.

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Marked as answer by Stephan Bren Thursday, June 11, 2015 4:49 PM
    Thursday, June 11, 2015 4:16 PM
    Moderator
  • Thanks Trevor.  Ok: I revised the statement and entered this:

    Move-SPUser -Identity $User1 -NewAlias "NEWDOMAIN\First.last" -IgnoreSID -confirm:$false

    But entering that returned this:

    Move-SPUser : The user does not exist or is not unique.
    At line:1 char:1
    + Move-SPUser -Identity $User1 -NewAlias "NEWDOMAIN\First.Last" -IgnoreSID -confirm:$ ...
    + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        + CategoryInfo          : InvalidData: (Microsoft.Share...PCmdletMoveUser:SPCmdletMoveUser) [Move-SPUser], SPExcep
       tion
        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletMoveUser
    This is a somewhat new response, so I'm making progress. I know the user contained in $User1 does exist, because I ran $User1 by itself again and was returned appropriate user information. I've checked the NEWDOMAIN on AD and did not find a user First.Last. Do I need to create that person first?

    General

    Thursday, June 11, 2015 4:25 PM
  • Yes, the user must exist in Active Directory first.

    Trevor Seward

    Follow or contact me at...

    This post is my own opinion and does not necessarily reflect the opinion or view of Microsoft, its employees, or other MVPs.

    • Marked as answer by Stephan Bren Thursday, June 11, 2015 4:49 PM
    Thursday, June 11, 2015 4:27 PM
    Moderator
  • I created the user in AD, and then re-ran this:

    Move-SPUser -Identity $User1 -NewAlias "NEWDOMAIN\First.last" -IgnoreSID -confirm:$false

    and this time the command completed without issue.  However, when I interrogated AllUsers for the site:

    $web=Get-SPWeb [site URL]
    $web.AllUsers | Select-Object ID, userLogin, DisplayName | Sort-Object ID | Format-table -auto
    I still see the user listed with the UserLogin property still presenting the old format.  Is this a caching issue?
    Thursday, June 11, 2015 4:37 PM
  • Never mind: i forget to consider that I needed to refresh the site object in order to get the latest changes to the AllUsers list. After I pulled the site object again, and then listed out AllUsers, the changes to the user appeared. Thanks again Trevor!
    Thursday, June 11, 2015 4:49 PM