Recently I’ve been working with the Export-SPWeb Cmdlet, helping out a customer who needs to export a specific list.
I quickly realised that it is actually a little bit more confusing than what you would expect, so I thought I would share the following.
Example one – exporting a list that exists in the root site collection:
Export-SPWeb -Identity http://content.contoso.cloud -ItemUrl /lists/testlist -Path "c:\export\export1.cmp"
Export-SPWeb -Identity http://content.contoso.cloud/sites/site-collection2/ -ItemUrl lists/testlist2 -Path "c:\export\export2.cmp"
Export-SPWeb -Identity http://content.contoso.cloud/sites/site-collection2/sub1/ -ItemUrl lists/testlist3 -Path "c:\export\export3.cmp"