Empty a large list using powershell

Recently I wanted to delete all entries in a large list, but manually it was hectic and time consuming. One way could have been to delete and re-create that list, but that list was tightly bound to an InfoPath form, and I did not had any backup source available.

I had been experimenting in PowerShell these days, so looked around for any script which I could modify for my purpose.

Here is that script, took it from different sources mentioned here.


Here is how you can use it.

Empty-List.ps1 -weburl [url of web] -listname [name of list]

My list was not too much big, I think I should re-modify it further to process items in multiple batches, and if possible also remove these items from recycle bin. I will post it separately.

One thought on “Empty a large list using powershell

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.