Content Management, PowerShell, SharePoint 2010

How to delete a document library that doesn’t have a delete option

Sometimes you might run into a document library or a list that doesn’t have a delete option under the list settings, this is common for default lists like Documents.

Those library’s cannot be deleted because they have a  property called AllowDeletion set to false.

In order to delete those library’s you can use the following power shell script which set the AllowDeletion property to true.

$web = Get-SPWeb(“http://YourSite”)

$list = $web.Lists[“Documents”]

$list.AllowDeletion = $true




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s