I need to migrate a document library includings all its documents and all meta data to another site collection. I did some research and quickly found a script that would seem to do the job, see source below.
Using Windows PowerShell ISE, I ran the script on a test libary in our test environment, only filling out those four initial parameters (site url etc). For the test, I have a site column with some simple text and a normal column (so local on the library itself) that's a lookup to values in another list on that site. When I ran the script it successfully copied over all the documents to the target location, but not the meta data.
What am I doing wrong or missing here? Does the meta data have to be of a certain type (columns or site columns). Can it migrate look-up columns? Would be great to hear some feedback as migrating it manually is really not do-able.
Source: https://gallery.technet.microsoft.com/office/Copy-all-SharePoint-Files-0999c53f