I’m using SharePoint 2010. Open the “SharePoint 2010 Management Shell” application. Start -> All Programs -> Microsoft SharePoint 2010 Products -> SharePoint 2010 Management Shell. Then enter the following commands:

$web = Get-SPWeb http://MySiteUrl/MySubsiteUrlIfNecessary

$list = $web.lists[“My List Title”]

$list.AllowDeletion = $true

$list.Update()

$list.Delete()

$list.Dispose()

$list.Dispose() does not work for me, but I saw it in an example, so I do it just for good measure.

I was getting an “Property ‘AllowDeletion’ cannot be found on this object; make sure it exists and is settable.” error when I tried $list.AllowDeletion = $true. That was because the list title I used did not exist in the $web that I specified.

Advertisements