How to delete a SharePoint list online using Powershell ?

Hello Sharepointers,

In this blog, we will see sharepoint online CSOM powershell commands to delete a list in office 365 or sharepoint online environment.

$site = ‘’
$admin = ‘Admin@myoffice365.OnMicrosoft.Com’
#Get Password as secure String
$password =””
$context = New-Object Microsoft.SharePoint.Client.ClientContext($site)
$credentials = New-Object Microsoft.SharePoint.Client.SharePointOnlineCredentials($admin , $password)
$context.Credentials = $credentials
$list = $context.Web.Lists.GetByTitle(‘mycustomlist’)

Happy SharePointing folks!!

Leave a Reply

Your email address will not be published. Required fields are marked *