I have a backup of a 2007 site which has been upgraded and added as the root site collection in a new web application. I am currently migrating content from this site collection to another site collection within the same web application (separate content databases).

I need to migrate the Users list (/_catalogs/users/simple.aspx) to the new site. Is there an easy way of migrating these users (such as using the OOB Migration API), or something as simple as iterating over each user, and running an EnsureUser on them in the new site?

  • 1
    Did the user permissions not come over when you moved the site collections, etc.? Sep 13, 2011 at 21:31
  • Here's the scenario: Restore a 2007 content DB, run the upgrade, and import it into a temporary site collection. At this point, I have a successful upgrade including all users. Now what I need to do (while migrating other things such as other libraries), is migrate the user accounts along with it. Sep 14, 2011 at 13:41

1 Answer 1


Here's a PowerShell Script that should do it. You need to supply the source and destination URLs and a group name to put the users into, at least temporarily.

$spWebDestination = Get-SpWeb -Identity http://destination.local
$spWebSource = Get-SpWeb -Identity http://source.local

$users = $spWebSource.SiteUsers
$destinationGroup = $spWebDestination.Groups["Temporary Group"]

"Source Group count = " + $users.Count 
"Destination Group count = " + $destinationGroup.Users.Count

foreach($user in $users)
    "Adding User " + $user.Name + " to " + $spWebDestination.Url

"New Destination Group count = " + $destinationGroup.Users.Count
  • Interesting concept. So by adding these users into the temporary group, does this add them to the hidden users list? As if they have logged in? I can't fully explain the requirement for needing them. It's just the requirement I was given for a separate app to work. Sep 14, 2011 at 13:42
  • @tim Yes. Adding the users to the group will add them to the site collection's User Information List.
    – Tom Resing
    Sep 14, 2011 at 23:38

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.