jeudi 26 mars 2015

How do I remove a site when the remove-spsite returns "object reference not set to an instance of an object" error

I have a 2010 SharePoint farm with 5 site collections. Because we're using TFS with multiple team project collections in the 2010 farm, I need to take a phased migration approach to move the content from the 2010 farm to the 2013 farm.

Because we're taking a phased migration approach, we will need to upgrade the content several times. SharePoint 2013 won't allow me to upgrade a site collection more than once. If I do, I get this error:

Site <url> cannot be upgraded

I get this error because the site collection's GUID exists in the database. It exists even if I delete the site collection in Central Administration.

A bit of googling suggests that I should use PowerShell to do this. So I attempted to do that:

remove-spsite -identity "<guid>"

returns the error:

Object reference not set to an instance of an object.

More googling suggests using a force option to delete. It fails with the same error.

If I query the SiteMap table in the SharePoint_Config database, I can see the GUID for the site in this table, but I'm reluctant to delete it using SQL for fear that I may create more orphans in the database.

Does anyone know how to fix this using a Microsoft released utility?

0 commentaires:

Enregistrer un commentaire