Share via


Cannot find an SPSite object with Id or Url in PowerShell

Question

Monday, June 19, 2017 2:08 AM

Hi,

I am trying to copy a site collection to a different url using SharePoint Management Shell. But when I am trying to run the command it is throwing an error saying "Cannot find an SPSite object with Id or Url".

Can anyone please post the fix for this issue.

Regards,

Vijay

All replies (4)

Monday, June 19, 2017 1:36 PM ✅Answered

Hi Vijay- make sure all your app pools are running. Try creating alternate access mapping. See the following link for details:

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/68bd3305-d251-4f09-abf2-1a0bc6a30b35/cannot-find-an-spsite-object-with-id-or-url-in-powershell-over-https?forum=sharepointgeneralprevious

Also make sure you're using the correct code and correct permissions:

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/1314ff38-26cd-4512-8b96-029356a2eab3/cannot-find-an-spsite-object-with-id-or-url?forum=sharepointdevelopmentprevious

https://social.msdn.microsoft.com/Forums/sharepoint/en-US/adda68ab-ee4d-4f2d-9cf5-2402b7dd6505/movespsite-cannot-find-an-spsite-object-with-id-or-url?forum=sharepointadminprevious

cameron rautmann


Monday, June 19, 2017 2:33 PM ✅Answered

This will be a permissions issue on the content database.

If this is helpful please mark it so. Also if this solved your problem mark as answer.


Tuesday, June 20, 2017 12:06 AM

Thanks heaps for your help.


Tuesday, June 20, 2017 7:00 AM

Just an FYI you want SPDataAccess (I think thats the name) if you want to allow people to query it with PowerShell. Other wise use the admin/farm account

If this is helpful please mark it so. Also if this solved your problem mark as answer.