<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Tech on Matt Thornton</title>
    <link>https://matt-thornton.net/tags/tech/</link>
    <description>Recent content in Tech on Matt Thornton</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en</language>
    <lastBuildDate>Fri, 10 Aug 2018 12:35:48 +0000</lastBuildDate><atom:link href="https://matt-thornton.net/tags/tech/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Bulk delete items and folders from Sharepoint document library using Powershell</title>
      <link>https://matt-thornton.net/tech/powershell-tech/bulk-delete-items-and-folders-from-sharepoint-document-library-using-powershell/</link>
      <pubDate>Fri, 10 Aug 2018 12:35:48 +0000</pubDate>
      
      <guid>https://matt-thornton.net/tech/powershell-tech/bulk-delete-items-and-folders-from-sharepoint-document-library-using-powershell/</guid>
      
        <description>&lt;p&gt;I&amp;rsquo;ll cut to the chase. A lot has been written about how to handle large lists and how to handle bulk deleting things. To summarise: getting all items and iterating one by one is *not* the way to do it.&lt;/p&gt;
&lt;p&gt;The right way to do it is to use the &lt;a href=&#34;https://docs.microsoft.com/en-us/dotnet/api/microsoft.sharepoint.spweb.processbatchdata?view=sharepoint-server&#34;&gt;ProcessBatchData&lt;/a&gt; method on the SPWeb object.&lt;/p&gt;
&lt;p&gt;Have done this plenty of times in C# but this time I wanted to cut straight to Powershell. A quick Google later and I found &lt;a href=&#34;http://www.danielroot.info/2012/03/how-to-bulk-delete-files-in-large.html&#34;&gt;Daniel Root&amp;rsquo;s boiler plate&lt;/a&gt;. It properly handles checked out files as well, and deletes folders. Ideal!&lt;/p&gt;</description>
      
    </item>
    
  </channel>
</rss>