September 06, 2012

Deleting sealed columns in SharePoint 2010

"Sealed" columns can't be deleted through List Settings or SharePoint designer.  I had accidentally added a sealed column to a list and needed to delete it, not just hide it from the content types.  I found this PowerShell script in a few places around the internet though JShidell presented it best.

Run in SharePoint 2010 Management Shell (PowerShell):

$web = Get-SPWeb -identity http://portal/site
$list = $web.Lists["Name of List"]
$column = $list.Fields["Name of Column"]
$column.Hidden = $false
$column.ReadOnlyField = $false
$column.Allowdeletion = $true
$column.Sealed = $false
$column.Delete()
$list.Update()