Steps
  1. Open your SharePoint Management Shell.
  2. Copy the code given below and paste it.
  3. Run the code given below.
  4. Open your SharePoint site
  5. Check if the execution completed successfully or not.
Code
  1. $siteURL = "https://gowtham.sharepoint.com/tutorial"
  2. $ListName="Tutorials"
  3. $site = new-object Microsoft.SharePoint.SPSite ($siteURL)
  4. $web = $site.OpenWeb()
  5. $oList = $web.Lists[$ListName];
  6. $collListItems = $oList.Items;
  7. $count = $collListItems.Count -1;
  8. for($intIndex = $count; $intIndex -ge 0; $intIndex--)
  9. {
  10. $collListItems[$intIndex].Delete();
  11. }
Thanks for reading the blog.