SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'd like to copy a list (and its contents) onto our production server. I've been trying to use the Export-SPWeb cmdlet, using this article as a reference, but I can't seem to get it to cooperate. I've successfully exported the whole web, but not individual lists, which is what I would prefer to do.

This is what I've tried:

PS J:\> export-spweb http://mysite -itemurl "lists/mylist" -path "c:\temp\mylist.cmp"

This is the (quite unhelpful) error message I get:

Export-SPWeb : <nativehr>0x80070057</nativehr><nativestack></nativestack>
At line:1 char:13
+ export-spweb <<<<  $web -itemurl "lists/mylist" -path "c:\temp\mylist.cmp"
    + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletExportWeb:
   SPCmdletExportWeb) [Export-SPWeb], ArgumentException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletExportWe

I believe it has to do with the -itemurl switch, because, when I take it out, powershell successfully exports the whole web.

share|improve this question
Thanks for the pointer and the article reference - export-spweb works great! – Daniel Dec 3 '13 at 19:24
up vote 3 down vote accepted

You need a slash at the start of the ItemUrl parameter. Your command should look like:

export-spweb http://mysite -itemurl "/lists/mylist" -path "c:\temp\mylist.cmp"


share|improve this answer
Thanks, that was my issue. – nfw Aug 22 '11 at 20:30
export-spweb http://servername/sites/PonniTest/ -itemurl "Lists/Try" -Path C:\raks.cmp

Note: Your Url should be terminated with a slash.

share|improve this answer
Export-SPweb -Identity http://site/sub1/sub2 -Path "c:\lstExport\lstName.cmp" -ItemUrl "/sub1/sub2/lstName" -IncludeUserSecurity -Force -IncludeVersions All

Add slash("/") at the start of the ItemUrl parameter.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.