I'm in the process of upgrading/cleaning up a large Web Application with a lot of Site Collections. On a SharePoint Foundation 2013 env.
I have found some questions about moving document libraries and lists but nothing really covers it good. At least not what from what I have found.
Is there a way to move Libraries and/or Lists from one site collection to another on the same web application without effecting any metadata on the files and keeping all versions of document/ListItems.
I would preferably like to do this using PowerShell.
Have any tips/links?
Another SPSE question that this question might be a duplicate of, but i don't believe the answer covers if there is a way to to this with PowerShell.
UPDATE
I have now investigated this more and tested some different ways to move Lists and Libraries.
Granular Backup and Restore (BennySkogberg)
- This worked but some metadata was lost. I found that user fields like custom user fields, Created By, Modified by and Create Date and so on, was not kept. Sadly, other ways this was easy to do.
- How to: In Central Admin go to Back Up and Restore -> Granular Back up -> Export a site or list. Use PowerShell to Import it. (
Import-SPWeb http://site -Path export.cmp -UpdateVersions Overwrite
)
Save List as Template, Include Content.
- Sometimes Include Content is "greyed-out".
Using code.
- Looses Metadata if I move SPFolder. (Time consuming if I recreate the list on a different site collection and move all items and tag the metadata per document.)