{"id":4569,"date":"2015-07-24T08:57:49","date_gmt":"2015-07-24T08:57:49","guid":{"rendered":"http:\/\/ngenioussolutions.com\/blog\/?p=76"},"modified":"2025-12-01T12:55:45","modified_gmt":"2025-12-01T12:55:45","slug":"blog-delete-all-sharepoint-list-item-using-powershell","status":"publish","type":"post","link":"https:\/\/ngenioussolutions.com\/blog\/blog-delete-all-sharepoint-list-item-using-powershell\/","title":{"rendered":"Delete all Items in SharePoint List Using PowerShell"},"content":{"rendered":"<h2>Delete all Items in SharePoint List Using PowerShell<\/h2>\n<p>Manually deleting all items in a SharePoint list can be a time-consuming and tedious task, especially when dealing with large amounts of data. By leveraging the power of PowerShell, you can automate the process of deleting all items in a SharePoint list, saving time and effort.<\/p>\n<p>In this guide, we will walk you through the steps to create a PowerShell script that can efficiently and reliably delete all items in a SharePoint list with just a few clicks. This solution will help you <a href=\"https:\/\/ngenioussolutions.com\/services\/support\/sharepoint\/\">streamline your SharePoint management<\/a> tasks and improve your overall productivity.<\/p>\n<p>&nbsp;<\/p>\n<div style=\"font-size: 15px; font-weight: 450;\">write-host &#8220;Type YES to continue&#8221;$retvalue = read-host<br \/>\nif ($retvalue -ne &#8220;YES&#8221;)<br \/>\n{<br \/>\nwrite-host &#8220;exiting&#8221; -foregroundcolor green<br \/>\nexit<br \/>\n}<br \/>\nwrite-host &#8220;continue&#8221;$web = get-spweb http:\/\/sharepointweburl:2015<br \/>\n$list = $web.lists | where {$_.title -eq &#8220;List Name&#8221;}<br \/>\nWrite-host &#8220;List $($list.title) has $($list.items.count) entries&#8221;<br \/>\n$items = $list.items<br \/>\nforeach ($item in $items)<br \/>\n{<br \/>\nWrite-host &#8221; \u00a0Deleted: $($item.id)&#8221; -foregroundcolor red<br \/>\n$list.getitembyid($Item.id).Delete()<br \/>\n}<\/div>\n<div style=\"background-color: #efefef; margin-top: 30px; padding: 20px 30px; text-align: left; border-radius: 3px;\">\n<p><span style=\"font-size: 18px; font-weight: 500;\">Related Article:<\/span><\/p>\n<ul style=\"font-size: 21px;\">\n<li><a href=\"https:\/\/ngenioussolutions.com\/blog\/how-to-update-sharepoints-group-owner-using-powershell\/\">How to update SharePoint\u2019s Group Owner using PowerShell<\/a><\/li>\n<li style=\"margin-top: 10px;\"><a href=\"https:\/\/ngenioussolutions.com\/blog\/get-extract-of-files-modified-after-particular-date-from-sharepoint-library-or-folder-within-library-powershell-script\/\">Get extract of files modified after particular date from SharePoint library or folder within library (PowerShell script)<\/a><\/li>\n<li style=\"margin-top: 10px;\"><a href=\"https:\/\/ngenioussolutions.com\/blog\/bulk-delete-sharepoint-list-items-using-csom\/\">Bulk delete SharePoint List items using CSOM<\/a><\/li>\n<li style=\"margin-top: 10px;\"><a href=\"https:\/\/ngenioussolutions.com\/blog\/window-scroll-event-is-not-firing-in-sharepoint\/\">Window scroll event is not firing in SharePoint<\/a><\/li>\n<\/ul>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Delete all Items in SharePoint List Using PowerShell Manually deleting all items in a SharePoint list can be a time-consuming and tedious task, especially when&#8230;<\/p>\n","protected":false},"author":1,"featured_media":8604,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[210],"tags":[],"class_list":["post-4569","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-microsoft-sharepoint-blogs"],"menu_order":0,"_links":{"self":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4569","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=4569"}],"version-history":[{"count":8,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4569\/revisions"}],"predecessor-version":[{"id":9939,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/posts\/4569\/revisions\/9939"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/media\/8604"}],"wp:attachment":[{"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=4569"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=4569"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ngenioussolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=4569"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}