Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Hi.
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 https://content.contoso.cloud -ItemUrl /lists/testlist -Path "c:\export\export1.cmp"
Example two - exporting a list from a site collection that is not root:
Export-SPWeb -Identity https://content.contoso.cloud/sites/site-collection2/ -ItemUrl lists/testlist2 -Path "c:\export\export2.cmp"
Example three - exporting a list that exists in a sub site, in a site collection that is not root:
Export-SPWeb -Identity https://content.contoso.cloud/sites/site-collection2/sub1/ -ItemUrl lists/testlist3 -Path "c:\export\export3.cmp"
Notice that the parameters change slightly depending on where the list exists?
Hope this saves you some time! :)
Cheers.
Comments
- Anonymous
July 16, 2016
Thanks for sharing. - Anonymous
February 23, 2017
Good shout - TechNet is not clear on tihs - Anonymous
August 17, 2017
Thanks :)