Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a custom content type and I added this content type to a list. I now want this list to only use the custom content type and I want to remove the built-in "Item" content type.

I tried

$spHeaderList.ContentTypesEnabled = $true

I used $spItemContentTypeId as 0x01 and as

$ItemID = [Microsoft.SharePoint.SPBuiltInContentTypeId]::Item
$spItemContentType = $spWeb.ContentTypes[$ItemID]

but still could not get it to work. I always get the error message that

"Cannot convert null to type "Microsoft.SharePoint.SPContentTypeId"

Any clues?

I am using SP2010

share|improve this question

2 Answers 2

Don't make it harder on yourself than needed - instead of trying to figure out the IDs yourself, just look for the plain text name you know. There is a good tutorial on how to remove a content type via powershell from a list here: Add and remove site content types from SharePoint lists using PowerShell.

Please note that you can only remove the "Item" content type from your list if there are no objects with the item content type currently in your list. The Powershell script blatantly copied below:

#Get site object and specify name of the library to look for in each site
$site = Get-SPSite http://YOURSITEHERE
$lookForList = "YOURLISTHERE”

#Walk through each site and change content types on the list specified
$site | Get-SPWeb -Limit all | ForEach-Object {

    write-host "Checking site:"$_.Title

    #Check list exists
    $docLibrary = $_.Lists[$lookForList]

    #Remove unwanted content types from the list
    if($docLibrary -ne $null)
        $ctToRemove = $docLibrary.ContentTypes["Item"]
        write-host "Removing content type" $ctToRemove.Name "from list" $docLibrary.Title
        write-host "The list" $lookForList "does not exist in site" $_.Title
#Dispose of the site object
share|improve this answer

The PowerShell code which can be helpful to remove ITEM content type from custom list.

    Add-PSSnapin "Microsoft.SharePoint.PowerShell"
    $web = Get-SPWeb "UrlOfYourSite"
    $list = $web.Lists["YourListName"]
    $ctToRemove = $list.ContentTypes["Item"]
        Write-Host "Removing Item content type"
        Write-Host "Item content type do not exists in list"
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.