Move-SPSite: Cannot find an SPSite object with ID or Url
-
06-10-2020 - |
Domanda
One of my sites has grown large, and I want to move it to a new Content DB.
I've created a new content db, ResearchDB, successfully added it to SharePoint (New-SPContentDatabase), and checked
Get-SPSite "http://intranet" | Get-SPWeb -Limit All | Select Title
to verify that my site, Research, is listed.
When I use
Move-SPSite "http://intranet/depts/research" -DestinationDatabase "ResearchDB"
I'm gettting
Move-SPSite : Cannot find an SPSite object with Id or Url: http://intranet/depts/research.
At line:1 char:12
+ Move-SPSite <<<< "http://intranet/depts/research" -DestinationDatabase "ResearchDB
"
+ CategoryInfo : InvalidData: (Microsoft.Share...PCmdletMoveSite:SPCmdletMoveSite) [Move-SPSite], SPCmdletPipeBindException
+ FullyQualifiedErrorId : Microsoft.SharePoint.PowerShell.SPCmdletMoveSite
Did a little research which said to verify that AAM is set with http://intranet
in default zone, which it was.
Soluzione
from the error, its looks like you are moving a subsite not a site collection. Move-spsite only works with site collections and it Moves site collections from one content database to another.
for verification you can run get-spsite "intranet/depts/research" and see if it returns an error or site id.
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange