We are currently migrating from sharepoint 2007 to 2010 on a dozen servers, due to technical reasons we cannot employ the usual methods and instead we are using the webservices and requests to transfer files and keep file integrity.

This seems to work on a majority of the files and servers, unfortunately due to the sheer datamass and connection issues at times some files have become lost. Also since sharepoint has a tedious habit of renaming files when a special character is present the current method I am employing will not work.

To clarify this is what i currently do: I map the Document Library to a network drive. And then run the following powershell script:

get-childitem $mypath -rec | where {!$_.PSIsContainer} | select-object Name, FullName, LastWriteTime, Length | export-csv -notypeinformation -encoding UTF8 -delimiter '|' -path D:\temp\20xxserver.csv

I run this on both servers and then compare via excel what is missing in the 2010 deployment from the 2007 deployment, I use the =IF(ISNA(VLOOKUP(B2;A:A;1;FALSE); B2; "") To see what is missing from the columns.

The issues im having: 1) Certain filenames will get changed for example "Press Release 10.07.2011-Internal.2012" or something along those lines will have part of the string removed due to the special characters such as dots commas slashes etc. Thus a direct comparison of what filenames exist is quite frankly not the best option

2) I have considered listing them by an ID number but unfortunately that is not an option with the current script

3) Since the UniqueID of a file should not change even when transfering/migrating files i have considered using that but the problem is that i have not found a solution to do this in powerpoint, which leaves me to believe that the only available option in this case would be to modify the existing migrationtool (or write a new one) to output the files into a csv list with the corresponding unique id number. Unfortunately i am somewhat under a deadline so if any one knows of a method of retrieving the ows_UniqueID via powershell and exporting to CSV i would be grateful.

If anybody else has a good suggestion or an improved method of checking the integretiy of data migration within the document library i would appreciate it.

EDIT: I have resolved the issue to a certain degree and have posted my Powershell scripts here: https://sharepoint.stackexchange.com/questions/83260/sharepoint-powershell-exporting-document-library-items-id-info-to-excel-for-2007

Unfortunately if you have the Hotfix KB:2506146 installed then you are going to run into issues.

1 Answer 1


When you map your list to the network drive you loose the SharePoint information like the unique id. I would suggest that you iterate over the list directly, grab the id and store it in the csv.

One question: Is the unique id consistent even after your migration?

  • From what i understand when you migrate by letting the 2010 server pull/download/transfer the files from the 2007 server using webservices vti_bin_lists.asmx then the data should remain the same, the last edited and last modified by will usually change but you can map that info into a structured xml list and then change it using the sharepoint.dll locally. At least that is the method that is currently used. Do you have any suggestion as to how i should iterate and grab it directly? Perhaps some powershell script that is already available?
    – Orbital
    Commented Nov 17, 2013 at 14:15
  • I found a couple of scripts which log into sharepoint and are able to retrieve items in a list but i am not sure if i will be able to retrieve the uniqueid, also i will see tommorow if the uniqueid remains persistant throughout a migration. Will post my solution here once I have one, perhaps other people will benefit in the future. If you see this message and have a recommended script on iterating through lists id appreciate it as an alternative to what i found so far.
    – Orbital
    Commented Nov 17, 2013 at 20:10
  • You will not have the same Unique Id after migration and you really shouldn't attempt to set this yourself and instead let the server generate. You'll need a different key for comparison. Unfortunately if the filenames are no good you should try to clean them up and have something consistent
    – Louis
    Commented Nov 18, 2013 at 2:15
  • 1
    If I may say so, I think part of your difficulties arise from the fact that you are not addressing the main problem, which is that your data migration was unreliable. If you can't fix that, you should write code to compare files directly in SharePoint on both sides instead of a mapped folder
    – Louis
    Commented Nov 19, 2013 at 4:01
  • 1
    @Louis I understand perfeclty that the main problem is data migration, currently there is no time to rewrite the migration tool, its about 10k lines of codes. Currently i am just running around headless and trying to fix problems. I have found a solution to read in data reliably using powershell, but i am still fixing problems. The UniqueID apparently is transported to the new servers so i have something to compare/reference with. All in all this is good news for me, problem is that when loading using the Get-SPweb and the GetItems() method I cannot read in string types. Fixing this right now
    – Orbital
    Commented Nov 19, 2013 at 11:09

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.