question

SayeedSediqi-3656 avatar image
0 Votes"
SayeedSediqi-3656 asked NitinPrasadCONCENTRIXCORPORATION-7162 commented

Delete this list” Missing in SharePoint online- Can someone help with this please?

Delete this list” Missing in SharePoint online- Can someone help with this please?

112584-capture1.jpg


office-sharepoint-online
capture1.jpg (21.0 KiB)
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

JoyZ avatar image
0 Votes"
JoyZ answered NitinPrasadCONCENTRIXCORPORATION-7162 commented

@SayeedSediqi-3656,

First of all, make sure you have the enough permission to delete lists:

112872-image.png
If the user permission is right, please go to list settings to check if you could see following option:

112845-image.png

If none of the above works, we can turn ON allow deletion flag and then delete a list by sending it to recycle bin in SharePoint Online with PowerShell-CSOM:

 #Load SharePoint CSOM Assemblies
 Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.dll"
 Add-Type -Path "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\16\ISAPI\Microsoft.SharePoint.Client.Runtime.dll"
      
 #Set parameter values
 $SiteURL="https://test.sharepoint.com/sites/Team1"
 $LibraryName="list75"
    
     
 Try {
     #Get Credentials to connect
     $Cred= Get-Credential
     $Credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($Cred.Username, $Cred.Password)
       
     #Setup the context
     $Ctx = New-Object Microsoft.SharePoint.Client.ClientContext($SiteURL)
     $Ctx.Credentials = $Credentials
      
     #Get the Document Library and set allow deletion flag
     $Library=$Ctx.Web.Lists.GetByTitle($LibraryName) 
     $Library.AllowDeletion = $True
     $Library.Update()
     $Ctx.ExecuteQuery()
                  
     #Delete the Document Library (Send to Recycle bin)
     $Library.Recycle() | Out-Null
     $Ctx.ExecuteQuery()
      
     Write-Host "Document Library: '$LibraryName' has been Deleted Successfully!" -ForegroundColor Green  
 }
 Catch {
     write-host -f Red "Error Deleting Document Library!" $_.Exception.Message
 }

If an Answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.




image.png (6.9 KiB)
image.png (7.2 KiB)
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How to use the above script with MFA?

0 Votes 0 ·