In this post, we will learn how to Get Content Type ID in SharePoint 2016 Using PowerShell?
If you have tried to create a custom action for a specific SharePoint content type, you will need to set the RegistrationId value to the content type as shown below:
![Get Content Type ID SharePoint 2016 Using PowerShell Custom Action list for a Content Type](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2016/08/custom-action-list-for-a-content-type.gif?resize=511%2C181&ssl=1)
In this case, you have two options to get Get SharePoint Content Type ID
- Get SharePoint Content Type ID as OOTB.
- Get SharePoint Content Type ID using PowerShell.
- Open the custom list that has the content type.
- Go to List Settings. (Make sure that the content types has been allowed).
- Advanced Settings > Allow management of content types.
![Get Content Type ID SharePoint 2016 Using PowerShell allow management of content types](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2016/08/allow-management-of-content-types.gif?resize=490%2C229&ssl=1)
- Below the Content Types Click on your Content-Type.
![Get Content Type ID SharePoint 2016 Using PowerShell Content types list](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2016/08/content-types-list.gif?resize=437%2C164&ssl=1)
- Here you can get the List Content Type.
http://RootSite/_layouts/15/ManageContentType.aspx?List=%7B9BFE9A3B%2DB7F8%2D4A61%2D8088%2D104DD333BEB7%7D&ctype=0x0100E076A4E49D4B5D47BDF993EC507AE0020049781978ADA96741B13B3D112904E4B5
![Get Content Type ID SharePoint 2016 Using PowerShell Get Content Type ID SharePoint from URL](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2016/08/list-content-type.gif?resize=490%2C611&ssl=1)
- Click On Parent to get the Site Content Type.
http://RootSite/_layouts/15/ManageContentType.aspx?ctype=0x0100E076A4E49D4B5D47BDF993EC507AE002
![Get Content Type ID SharePoint 2016 Using PowerShell site content type](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2016/08/site-content-type.gif?resize=562%2C605&ssl=1)
here, we will show how to
- Get All Content Types in SharePoint Site.
- Get Content Type ID by Content Type Name in SharePoint Site
- Open SharePoint Management Shell as Administrator.
![Get Content Type ID SharePoint 2016 Using PowerShell Open SharePoint 2016 PowerShell - Upgrade and Migrate to Project Server 2016](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2017/10/open-sharepoint-2016-management-shell-as-administrator.png?resize=332%2C489&ssl=1)
- Run the below script one by one with your own site URL
$site = Get-SPSite -Identity http://RootSite/
$web = $site.OpenWeb("YourSite")
ForEach($ctype in $web.ContentTypes){write-host $ctype.Name": "$ctype.ID}
Output
CustomActionCT : 0x0100E076A4E49D4B5D47BDF993EC507AE002
- Open SharePoint Management Shell as Administrator.
![Get Content Type ID SharePoint 2016 Using PowerShell Open SharePoint 2016 PowerShell - Upgrade and Migrate to Project Server 2016](https://i0.wp.com/spgeeks.devoworx.com/wp-content/uploads/2017/10/open-sharepoint-2016-management-shell-as-administrator.png?resize=332%2C489&ssl=1)
- Run the below script one by one with your own site URL, and the content type name
$site = Get-SPSite -Identity http://epm/
$web = $site.OpenWeb("workflow")
ForEach($ctype in $web.ContentTypes){write-host $ctype.Name": "$ctype.ID | Where-Object {$ctype.Name -eq 'Contet Type Name'}}
Output
CustomActionCT : 0x0100E076A4E49D4B5D47BDF993EC507AE002
Applies To
- SharePoint 2016
- SharePoint 2013
Nice one!