Delete Document Library using SharePoint Power Shell Script


$SiteUrl = "http://SP:2010/sites/TestSite"
$web = Get-SPWeb $SiteUrl  
$library = $web.lists["Shared Documents"]
$library.AllowDeletion = $True
$library.update()
$library.Delete()

Comments

Post a Comment

Popular posts from this blog

Sending email using Powershell script

Convert List Collection to DataTable using C#

Difference Between Site Template and Site Definition