Categories
SharePoint

SharePoint Content Type IDs

This is a handy PowerShell snippet for returning a list of all Content Types and their IDs within a SharePoint site. $site = Get-SPSite http://www.domain.com $web = $site.RootWeb ForEach( $contentType in $web.ContentTypes ) { Write-Host $contentType.Name": "$contentType.ID }

This is a handy PowerShell snippet for returning a list of all Content Types and their IDs within a SharePoint site.

$site = Get-SPSite http://www.domain.com
$web = $site.RootWeb
ForEach( $contentType in $web.ContentTypes ) { Write-Host $contentType.Name": "$contentType.ID }