1

I've been trying to activate the DocID feature on certain sites in our Site Collections. On each site collection we have the DocID feature activated following these instructions. For a long time we thought it just wasn't doing anything but I just ran a script (below) which shows the activation level of the DocID property. Turns out we have a few that are active, some that are disabled, and a ton that just don't have the DocID property at all.

Is there a reason that only some pages have enabled DocIDs?

$WebApplications = Get-SPWebApplication
$sites = $WebApplications | Get-SPSite -Limit All
$webs =  $sites | Get-SPWeb -Limit All

$lst = @();
foreach ($web in $webs) { 
    $status = $web.Properties["docid_enabled"]

    $obj = New-Object psobject
    $obj | Add-Member noteproperty Title ($web.Title)
    $obj | Add-Member noteproperty URL ($web.Url)

    if ($status -eq "0") {
        $obj | Add-Member noteproperty DocIDStatus ("Disabled")
    }
    elseif($status -eq "1") { 
        $obj | Add-Member noteproperty DocIDStatus ("Active") 
    }
    elseif($status -eq $null) { 
        $obj | Add-Member noteproperty DocIDStatus ("Not Found") 
    }
    else {
        $obj | Add-Member noteproperty DocIDStatus ('Other: ' + $status.ToString()) 
    }
    $lst += , $obj
    $web.dispose()
}
$lst | Sort-Object -Property DocIDStatus,URL | Format-Table

Write-Host "Script Execution finished" -ForegroundColor DarkGreen

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.