Export-SPWeb - exporting lists


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"

Example two - exporting a list from a site collection that is not root:

Export-SPWeb -Identity http://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 http://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! :)