Synch User Fields when copying lists from one sitecollection to another
If you copy a list from one sitecollection to another one with a list template and the copied list has user fields than you'll have other users in the destionation list. This occures because SharePoint saves all user in a own UserInfo table for each sitecollection. A user in SiteCollection 1 can have the ID 5 and in another the ID 3. As the SPUserField is a LookUp Field to the User Info List the name of the User in the destination list can change. Two little PowerShell Scripts can help here. The first one reads the user info for a field in the source list and creates a csv with the information. The second one reads the csv and updates the destination list. Copy the code to two .ps1 files. Open the SharePoint 2010 Management Shell and run the "Dump user Info" script to dump the infos to a .csv file. Afterwards run the second script to update the destination list. Dump User Info # Adapt these values $web = Get-SPWeb "http://sharepoint/sites/sourcelis