Kashif Nizam Qureshi

Deleting Project Server Orphaned Sites

Leave a comment

Run the following one by one.

Get-SPServiceApplication

$sa = get-spserviceapplication | ? {$_.Id -eq "33c1ead8-9721-4a24-a0aa-4a9b69915952"} // Above guid
$sa

followed by

$sc = $sa.SiteCollection
$sc

$a = $psi.Sitecollection | where {$_.SiteID -eq "9c601a96-0a44-4bb7-9911-d504b79e7209"} // Above SC SiteID guid

$sc = $sa.SiteCollection // in case you have more SC
$sc

$a = $psi.Sitecollection | where {$_.SiteID -eq "cdeeb69f-6858-46a6-bd2a-99fe2d2b3f7c"} // Above SC SiteID guid

then

$a.Delete()

//Note the above once didn't work for removing one of the instance, it did work well for other once ( I had two). Use the following to delete.
$svApp = Get-SPServiceApplication -Name "Project Web App Service Application"
$svApp.SiteCollection

// First use SITEID, if that doesn't do anything try with ID from what you get from the above command

$svApp.SiteCollection.Remove("a09c6964-efc2-4917-9448-ce86d0bc95d3")

//Lastly,

Remove-SPServiceApplication $svApp -RemoveData

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s