Error on the SDK documentation SharePoint 2010 ECM Code Sample: Custom Document ID Provider

Hi all

Some time ago I was troubleshooting with a customer regarding Custom Document Id Providers and how to reset them by code (I will create an entry in the following days regarding to that).

It turns out that the PowerShell Script of the SDK documentation SharePoint 2010 ECM Code Sample: Custom Document ID Provider https://msdn.microsoft.com/en-us/library/ff521589.aspx  was wrong.

The right script in order to set the new Custom Document ID Provider is:

$site = Get-SPSite https://MyServer

[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.Office.DocumentManagement")

$assembly = [System.Reflection.Assembly]::LoadWithPartialName("CustomDocIdProvider")

$obj = new-object Microsoft.SDK.MOSS.Samples.CustomDocumentIDProvider

[Microsoft.Office.DocumentManagement.DocumentId]::SetProvider($site,$obj);

It has been notified to my colleagues from the Product Group in USA and it should be fixed in the following weeks/months

Thanks.

Kind Regards.

Available on Spanish at the Spanish SharePoint Support Team blog HablaMOSS

Héctor Calvarro Martín. SharePoint Dev/Core. Microsoft Support Escalation Engineer for EMEA