Thursday, 23 April 2015

Delete / Force / Remove Rogue or Orphaned Site Collection in SharePoint 2013

Whilst provisioning app catalog site, encountered an issue with the database permissions. Aftering sorting that out, whilst re-provisioning the app catalog site , found the previous attempt added a rogue / orphaned site colleciton.

Though the site colleciton was visible in central admin, however, the option to delete was graded out.

Use the following Powershell, this did the trick.

$site = Get-SPSite https://intranet.contoso.com/apps/appstore
$siteId = $site.Id
$siteDatabase = $site.ContentDatabase
$siteDatabase.ForceDeleteSite($siteId, $false, $false)

No comments:

Post a Comment