dhaverstraw
asked on
SharePoint 2010 Import Cannot find SPWeb object
I am using PowerShell (running as admin) to restore a library in my SharePoint 2010 environment. The problem I am having is when I run this script:
Import-SPWeb -identity "http://MySharePoint/Site Name/Library Name" -path c:\ Backup\Export.cmp
I receive this error: Import-SPWeb: Cannot find an SPWeb Object with Id or Url: http://MySharePoint/Site Name/Library Name. At line 1 char:13
I have made sure that the account I'm logged in as has permission to the database and library.
Import-SPWeb -identity "http://MySharePoint/Site Name/Library Name" -path c:\ Backup\Export.cmp
I receive this error: Import-SPWeb: Cannot find an SPWeb Object with Id or Url: http://MySharePoint/Site Name/Library Name. At line 1 char:13
I have made sure that the account I'm logged in as has permission to the database and library.
Please run the command using farm admin account or system account..
Import-spweb -Identity http://mysite/sitename -ItemUrl /libraryname -Path "path\file.export"
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Let me ask a dumb question then... does the Import command have to point to the original backed up location? I don't want to overwrite the library items that are already in my SharePoint. I was trying to import them into a temporary library then choose the items that needs to be restored.
No, but when it imports, it will look for a library/list with the same name. If it doesn't exist, it should create it. If it does exist, and you specify "-force", it will overwrite.
ASKER
This was the solution! I thought you had to add the exact path. I can't thank you enough!