In this article I am showing how to migrate a single list from SharePoint 2007 to SharePoint 2010.The basic steps are:
Step 1Open Windows PowerShell in 2007 server and paste in the following script to export a list to a folder in 2007 server:function Import-List([string]$DestWebURL, [string]$FileName, [string]$LogFilePath){[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint") > $null[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint.Deployment") > $null$settings = New-Object Microsoft.SharePoint.Deployment.SPImportSettings$settings.IncludeSecurity = [Microsoft.SharePoint.Deployment.SPIncludeSecurity]::All$settings.UpdateVersions = [Microsoft.SharePoint.Deployment.SPUpdateVersions]::Overwrite $settings.UserInfoDateTime = [Microsoft.SharePoint.Deployment.SPImportUserInfoDateTimeOption]::ImportAll$site = new-object Microsoft.SharePoint.SPSite($DestWebURL)Write-Host "DestWebURL", $DestWebURL$web = $site.OpenWeb()Write-Host "SPWeb", $web.Url$settings.SiteUrl = $web.Url$settings.WebUrl = $web.Url$settings.FileLocation = "C:\ListExport\"$settings.BaseFileName = $FileName$settings.LogFilePath = $LogFilePath$settings.FileCompression = 1Write-Host "FileLocation", $settings.FileLocation$import = New-Object Microsoft.SharePoint.Deployment.SPImport($settings)$import.Run()$web.Dispose()$site.Dispose()}# For Export a specified SharePoint ListExport-List " Your List Url /" ListURL "Your List Url /"After you have run this shell script you will have your export list in the 2007 server in "C:\ListExport\".Step 2Next, what we need to do is change this DAT file to a CAB.Extract the file so that you can access SystemData.xml in the CAB file, and modify the version information there.Open the SystemData.xml file in a text editor, and change Version="12.0.0.0" to Version="14.0.0.0", and Build="12.0.0.6514" to Build="14.0.0.1000".Step 3Copy all files that come in the CAB folder along with the modified SystemData.xml file to "C:\Program Files\Microsoft Visual Studio 9.0\VC"; see:Open a Visual Studio command prompt and paste in the command:makecab.exe /f makecab.ddf As shown below:A ListSt.CAB file is created as shown below in Screen shot. A Sample DDF file is also shown below:Now open the ListSt.CAB folder and import in 2010.Step 4Copy the cab file to the 2010 server.We can use PowerShell on a SharePoint 2010 server and run the Import-spweb to import the list.PS C:\> Import-SPWeb -Identity "http://trvustcvdw0110:11254/" -Path "E:\Rogin\ExportNewlist.cmp" –IncludeUserSecurityNow the list is ready in the 2010 site as shown below:
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: