Monday, September 15, 2014

Powershell to find Orphaned Databases

To get a list of orphaned databases : Get-SPDatabase | where {$_.exists -eq $false}

To delete the orphaned databases : Get-SPDatabase | where {$_.exists -eq $false} | foreach {$_.delete()}

Hope this helps you

No comments:

Post a Comment