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 b
I believe it has to do with the
-itemurl switch, because, when I take it out, powershell successfully exports the whole web.