In this post, we will learn how to get the list of all RegistrationId SharePoint templates using PowerShell in SharePoint 2016 and SharePoint 2013.
When creating a new custom action in SharePoint programmatically, you will note that there is an entry called RegistrationId that set to a number value as shown below:
The RegistrationId is the template type id of the object like the list , library … etc that you need to add a custom action within its ribbon.
As known 100 is for Generic list (as a custom list) and 101 for the document library, but how we can get the other Registration Id for each Registration Type?
The below PowerShell cmdlet displays the available RegistrationId Template List in SharePoint:
[System.Enum]::GetNames([Microsoft.SharePoint.SPListTemplateType]) | select {[int][System.Enum]::Parse([Microsoft.ShareP
oint.SPListTemplateType], $_)} , {$_} | Format-Table -HideTableHeaders
Applies To
- SharePoint 2016
- SharePoint 2013