Get item by DocID using PowerShell
-
03-10-2020 - |
Question
Has anybody retrieved items by their DocId using powershell. Specifically the ID generated by the DocID service. I'm looking to get details of items based on a (large) list of DOCIDs. I guess I could use the search service but wondered if anybody had done something similar.
Solution
Using PowerShell you can get it using
$site = Get-SPSite http://siteurl
$provider = [Microsoft.Office.DocumentManagement.DocumentId]::GetProvider($site)
$result = $provider.GetDocumentUrlsById($site, "DocID-1-1")
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange