SharePoint content movement within various environments are one of the frequent task for SharePoint Administrators. Site administrators, developers or testers used to create/update/delete lot of testing site collections in an existing web application, where you already have hundreds of Site collections restored from Production.

In some scenarios, where few of the test site became orphan site, Site collection not exist in farm even though content database have it's entry. For example, I had a Site collection showing in central admin/ Get-SPSite command. But this not fetching other details or not even giving option to delete it.
In such case I found below bunch of PowerShell command very helpful to clean these.

Please follow below script to Forcibly delete these corrupt sites:
-Tried only in SharePoint 2010/2013
-Run in any lower environment first to test this script.

###################################################
##  Script to delete currupt sites  with Force   ##
##                                               ##
##  -Run in SharePoint Management Shell          ##
##  -Change $CorruptSite variable with your      ##
##    Site collections                           ##
###################################################
Add-PSSnapin Microsoft.SharePoint.PowerShell
Function DeleteCorruptSite
{
param($CorruptSite)
Write-Host $CorruptSite : -foreground red
$site = Get-SPSite $CorruptSite
$siteId = $site.Id
$siteDatabase = $site.ContentDatabase
$siteDatabase.ForceDeleteSite($siteId, $false, $false)
Write-Host --Deleted from Content DB -foreground green
}
foreach ($CorruptSite in $CorruptSites)
{
 DeleteCorruptSite $CorruptSite
}