Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Delete a corrupted SharePoint list
##Script para Deletar Listas corrompidas
Add-PSSnapin Microsoft.SharePoint.PowerShell
#Get the Web
$web = Get-SPWeb "<SharePoint-site-URL>"
#Get the corrupted List
$list = $web.lists["corrupted list name"]
#Set the AllowDeletion Flag to True
$list.AllowDeletion = $true
$list.Update()
#Delete the list
$list.Delete()
#Or can try this
#Get-SPWeb "http://sharepoint-site-url" | where-object { $_.Lists["corrupted list name"].Delete()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.