Document Id is something which SharePoint internally assigns to documents and maintains a uniqueness for each document.
This Document Id never changes even if the document is moved anywhere else and so can be used as a bookmark to the document.
Just in case you want to access the DocId value or want to change it (not recommended though !!), you can refer to the the internal SharePoint column _dlc_DocId.
Get Doc Id value for a document
$item["_dlc_DocId"]Set Doc Id value for a document
$item["_dlc_DocId"] = "NewId-12345"Here is a complete example using PowerShell to access and modify the Document Id
PowerShell script to get and set the Document Id (_dlc_DocId) column
$web = Get-SPWeb http://SharepointSiteUrl $list = $web.lists["Shared Documents"] //Get handle of item by ItemId $item = $list.getitembyid(1) //Get the Document Id using column _dlc_DocId $item["_dlc_DocId"] //Checkout before making changes $item.File.CheckOut() //Set the Document Id using column _dlc_DocId $item["_dlc_DocId"] = "NewId-12345" $item["_dlc_DocIdUrl"] = "http://SharePointSiteUrl/_layouts/DocIdRedir.aspx?ID=NewId-12345, NewId-12345" $item.update() //Check in once changes are completed $item.File.CheckIn("DocId changed and document checked in")
Note- Once the Document Id is modified, a search crawl (incremental is sufficient) is required in order to associate the changes with the document, else you will get errors when clicking on the Document Id.
- PowerShell - How to use Try Catch Finally blocks for error exception handling (Windows/SharePoint)
- SharePoint List excel import - This table exceeds the maximum number of supported rows
- Update SharePoint Online List Item using REST API, HTML, Spfx, Postman
- Fix SharePoint Error - The Managed Metadata Service or Connection is currently not available. The Application Pool or Managed Metadata Web Service may not have been started
- SharePoint list excel import error - Title is a required filed and can't be empty
- Move Copy Migrate SharePoint OneDrive files folders to different site collection location
- Create SharePoint list from Excel spreadsheet and import table
- Send Email using SharePoint PowerShell command, SMTP server
- [Fix] Restricted View permission level missing in SharePoint Online site library
- How to get SharePoint List Item URL using PowerShell
- The service instance
- How to get the SharePoint Tenant Login URL
- New-SPLogFile PowerShell - create new SharePoint log file
- Not receiving email notification alert in SharePoint Online workflow - Power Automate, FLOW
- SharePoint Server 2016 Preview installation error - This Product Key isn't a valid Microsoft Office 2016 Product Key. Check that you've entered it correctly.
- How to change order of fields on new item form for SharePoint Online list
- Update Created By (Author) column of SharePoint document using PowerShell
- How to delete SharePoint Online List Item using REST API
- 'Edit Document' Requires a Windows Sharepoint Services-compatible application and Microsoft Internet Explorer 6.0 or higher
- Create SharePoint Site Collection using PowerShell New-SPSite
- How to customize SharePoint Modern list form using JSON formatting
- How to get SharePoint Online user details from person or group column using REST API
- SharePoint excel error - A problem occurred while connecting to the server. If the problem continues, contact your administrator.
- How to create SharePoint List Item programmatically using C#.net
- How to Get or Set SharePoint Document ID _dlc_DocId using PowerShell
- Replace new line with comma in Sublime Text Editor - Sublime-Text
- Linux Remove or Delete Files and Directories using Terminal Commands - Linux
- How to uninstall GarageBand from Mac - MacOS
- Android Studio SDK Build-tools 23 rc2 not getting installed - Android-Studio
- Compare two text files in Notepad++ - NotepadPlusPlus
- What is BTS? What is BTS A.R.M.Y? What is its meaning? - BTS
- Get Button Text onClick Android App - Android
- [Solution] Notepad++ Compare option unavailable - NotepadPlusPlus