Pages

Friday, January 3, 2014

Import-SPWeb : Cannot find an SPWeb object with Id or Url

Import-SPWeb : Cannot find an SPWeb object with Id or Url : "Your Url Here".
At line:1 char:13
+ import-spweb <<<<
    + CategoryInfo          : InvalidData: (Microsoft.Share...CmdletImportWeb:
   SPCmdletImportWeb) [Import-SPWeb], SPCmdletPipeBindException
    + FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletImportWeb

If you have run into this error. You are trying to import a site that does not exist in the current URL. This happened to me while trying to move a site from my dev environment to my production environment. You have to options

  1. You can create the site , and then import it. or,
  2. You can use stsadm -o import , and this will take care of creating the site for you.