Archive for month: March, 2015

Powershell Script to Efficiently Locate Large Files in SharePoint 2010/2013

23 Mar 2015
March 23, 2015

Recently I had the request to locate all files that are bigger than 40 MB – and they were located in the entire farm across multiple Site Collections.  Easy you might say? Just use search and query for


Well, I said efficiently and thats the most efficient way – you are right! They key constraint here is that those files were excluded from search – so lets go for the PowerShell way.

The Script

Here comes the script that uses PowerShell to iterate over each Site Collection, every Web and every List – then uses CAML to query each list for items larger than the specified size. It works for SharePoint 2013 and should definitely work for 2010, too.

Enough words, here we go:


The result looks like this:

Get large files script in action

Get large files script in actionYou can easily export that to a csv file

You can easily export that to a csv file with:

$result | export-csv result.csv

I ran it again a quite large SharePoint 2013 environment (~1 TB, 1075 Site Collections) and it came back in ~5 minutes.


You see room for improvement for my PowerShell script to efficiently locate large files? If so, please tell me!

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.