696 B
696 B
orphaned objects
Montag, 13. Februar 2017
16:19
[LOCALHOST] Error: SharePoint content databases does contain orphaned objects.
Hintergrund:
Ein oder mehrere Content Datenbanken enthalten verwaiste Objekte
Lösung:
Get-SPContentDatabase |ForEach { ($_.Repair($true))}
Prüfung:
$orphans = $false
try {
Get-SPContentDatabase |ForEach {
$xmlDoc = [Xml]($_.Repair($false))
$orphanedObjects = $xmlDoc.OrphanedObjects
if ($orphanedObjects.Count -gt 0) {
$orphans = $true}
}
}
catch {
$orphans = $true
}
$orphans -eq $false
Die letzte Abfrage muss "True" zurückliefern