Articles about European Sharepoint Hosting Service
SharePoint Hosting – Delete A List In SharePoint Online Using PnP Powershell
Today, we’ll look at deleting a SharePoint List in Office 365 using PowerShell PnP. First we need to connect the SharePoint Online site using the below command,

Step 1
Open SharePoint Management Shell as an Administrator in your machine.
Step 2
Run the following command to import PnP to install the PowerShell cmdlets,
1 |
Install-Module SharePointPnPPowerShellOnline |
Step 3
To use the library you first need to connect to your tenant using the below cmdlets.
1 |
connect-PnPOnline –Url https://fortunestrikes.sharepoint.com –Credentials (Get-Credential) |
Syntax – https://docs.microsoft.com/en-us/powershell/module/sharepoint-pnp/remove-pnplist?view=sharepoint-ps
1 2 3 4 5 6 |
Remove-PnPList -Identity <ListPipeBind> [-Recycle [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-Web <WebPipeBind>] [-Connection <PnPConnection>] |
Syntax – Remove List item
1 2 3 4 5 6 7 |
Remove-PnPListItem -List <ListPipeBind> -Identity <ListItemPipeBind> [-Recycle [<SwitchParameter>]] [-Force [<SwitchParameter>]] [-Web <WebPipeBind>] [-Connection <PnPConnection>] |
Now that we’re logged into the site collection, let’s create our List/document library.
Remove List/ document library
1 |
Remove-PnPList -Identity DemoList |
Remove-Pn PList Item
1 |
Remove-PnPListItem -List "Demo List" -Identity "5" -Force |
Thanks for reading my blog.
Print article | This entry was posted by Peter on August 6, 2020 at 5:56 am, and is filed under Other Related Post. Follow any responses to this post through RSS 2.0. Both comments and pings are currently closed. |