none
Export-SPWeb "cannot find spweb object with id or url" error RRS feed

  • Question

  • How do we just export and import a library or a list using Export-SPWeb and Import-SPWeb?
    I tried exporting just a library with Export-SPWeb, but it throws an error : Could not find an SpWeb Object with Id or URL “http://<server:port>/Shared Documents”. The same thing goes for a simple list like Tasks: "http://<server:port>/Lists/Tasks".

    Any help would be much appreciated

    Thursday, September 9, 2010 3:25 AM

Answers

  • Okay, 

    I have found the answer. To export lists or libraries using Export-SpWeb, we need to specify itemurl attribute.

    For e.g.

    PS > Export-SPWeb http://<servername:port> -itemurl /Lists/Tasks -path "C:\task.cmp"
    

    Hope this helps someone else too!

    • Marked as answer by Sid Kothari Thursday, September 9, 2010 5:07 AM
    Thursday, September 9, 2010 5:07 AM

All replies

  • Have you tried to do this via Central Admin?

    Steps here

    http://technet.microsoft.com/en-us/library/ee428293.aspx#section2

    Also post what is the exact PowerShell cmd you are trying with.

    Do you have SPShell Admin Access?

    http://technet.microsoft.com/en-us/library/ff607596.aspx


    Alpesh Nakar's Blog Alpesh Just SharePoint Just SharePoint Updates

    SharePoint Conference Southeast Asia Oct 26-27 2010 Contributing Author SharePoint 2010 Unleashed

    MCTS: SharePoint 2010 Configuration MCITP: SharePoint 2010 Administrator

    Thursday, September 9, 2010 3:31 AM
  • Hi Alpesh,

    Yes, the Central Admin "Export a site or list" works. But I am trying to do this through PowerShell.

    Yes, I have the SPShell Admin access. And just to be sure I ran this command again:

    Add-SpShellAdmin -username <myusername>
    

    and it worked fine.

    The command I am trying to execute to export a list is:

    PS > Export-SpWeb -identity http://<servername:port>/Lists/AllTasks -Path "C:\sample.cmp"
    

    I get the following error:

    Export-SPWeb : Cannot find an SPWeb object with Id or Url : http://<servername>/Lists/AllTasks.

    At line:1 char:13

    + Export-SpWeb <<<<  -identity http://<servername>/Lists/AllTasks -Path "C:\sample.cmp"

        + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletExportWeb:

       SPCmdletExportWeb) [Export-SPWeb], SPCmdletPipeBindException

        + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletExportWeb

    Thursday, September 9, 2010 4:13 AM
  • Okay, 

    I have found the answer. To export lists or libraries using Export-SpWeb, we need to specify itemurl attribute.

    For e.g.

    PS > Export-SPWeb http://<servername:port> -itemurl /Lists/Tasks -path "C:\task.cmp"
    

    Hope this helps someone else too!

    • Marked as answer by Sid Kothari Thursday, September 9, 2010 5:07 AM
    Thursday, September 9, 2010 5:07 AM
  • thanks, this is the answer I'm seeking
    Monday, August 20, 2012 2:34 AM