SharePoint (2003 thru Online): SharePoint Online: “Delete this Document Library” is missing!

Tuesday, July 5, 2022

SharePoint Online: “Delete this Document Library” is missing!

Use the below Command to install PnP PowerShell Module.

Install-Module PnP.PowerShell

Once the PnP PowerShell Module is installed successfully, we need to run the below command to register Azure AD Application and Grant Access to the Office 365 tenant by Accepting the Consent on behalf of your organization.

Register-PnPManagementShellAccess

_______________________________________________________________________________________________
SharePoint Online: “Delete this Document Library” is missing!

While migration to SharePoint Online, from SharePoint 2007, 2010 & 2013 versions, there is a chance to copy over the lists and Libraries created by "This system library was created by the Publishing feature" where you don't see option to delete those lists or libraries.

We can achieve that by using the below Powershell Script.
In the below PowerShell Script, we targeted Form Templates Library technically called as FormServerTemplates.

The above is the screenshot before running the Script.

#Parameters
$SiteURL = "https://gurram.sharepoint.com/sites/pro"
$ListName = "FormServerTemplates"
 
#Connect to PnP Online
Connect-PnPOnline -Url $SiteURL -Interactive
 
#Get the List
$List = Get-PnPList -Identity $ListName
  
#Enable Delete option for the list
$List.AllowDeletion = $True
$List.Update()
Invoke-PnPQuery


The below is the Screenshot after running the Script.


No comments:

Post a Comment