You are on page 1of 4

Sometimes, when you provision a list instance with Visual Studio, the provisioning could fail if there were

errors in the script. Then you got a corrupted list. This could happen during the migration process as well. It is hard to be removed from SharePoint user interface or SharePoint designer. You can delete it with following PowerShell script. $web = get-spweb -Identity http://sp2010 $list = $web.lists["corrupted list name"] $list.AllowDeletion = $true $list.Update() $list.Delete()

powershell commands to delete a SharePoint 2010 list


$web = Get-SPWeb http://portal/cwie/support/Continuity $lists = $web.Lists $custom = $web.lists["Con CF Projects"] $custom.Delete()

Delete SharePoint 2010 List using PowerShell script


If you are facing issues like "Delete this list" menu missing because SPList.AllowDeletion property is set to False. So that "Delete this List" link in the list settings is missing Solution: Power-Shell Script $assignment = Start-SPAssignment $web = Get-SPWeb -Identity "http://your site" -AssignmentCollection $assignment $list = $web.lists["List Name"] $list.AllowDeletion = $true # will allow to update the list $list.Update() #Link will be visible $list.Delete() # delete the list Stop-SPAssignment $assignmen
Guys, One of my friend was looking for solution to remove list template of custom list using Power Shell. So, Ive created quick Power Shell script for the same as below and that worked perfect: Power Shell Script:

1 2 3 4 5 6 7 8

$site = Get-SPSite http://site $web = $site.OpenWeb() $spFolder = $web.getfolder("_catalogs/lt")


#$spfileCollection = $spfolder.Files

$spfolder.Files | %{ if ($_.Name -eq "templatename.stp") { write-output "found" $_.Delete()

9 10 11

} }

SharePoint 2010 Delete a list by using Powershell


Jun 5th, 2012 by Karsten Pohnke.

If you have a corrupted list which should be deleted this might be helpful to delete the list. Just open Powershell on your server and use this script to delete the list:

Get-SPWeb "YourSiteCollectionUrl" | Where-Object { $_.Lists.Delete([System.Guid]$_.Lists["Listname"].ID) }

Hope this helps.

You might also like