In this article we will be seeing how to change the custom document id provider to the default document id provider in SharePoint 2010. Once the custom document id provider is configured we can change that to the default document id provider using API or powershell script. Using C# code:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using Microsoft.SharePoint; using Microsoft.Office.DocumentManagement;
namespace ConsoleApplication { class Program { static void Main(string[] args) { SPSite site = new SPSite("http://serverName:20/"); DocumentId.SetDefaultProvider(site); site.Dispose(); } } } Using powershell script: $site = Get-SPSite http://servername:20/ [Microsoft.Office.DocumentManagement.DocumentId]::SetDefaultProvider($site) $site.Dispose()
You need to be a premium member to use this feature. To access it, you'll have to upgrade your membership.
Become a sharper developer and jumpstart your career.
$0
$
. 00
monthly
For Basic members:
$20
For Premium members:
$45
For Elite members: