PowerShell – Search for files and create report with location, size, and last modified time.

I created this script when we needed to search all user network shares, as well as business department shares for PST files. We were in the process of migrating to a central email archiving solution and needed to get an idea on the possible storage requirements that would be required for importing all user PST files.

Finding PST Files

Finding PST Files

This script is simple, but very universal, as you’re able to enter any directory and file name/extension.

Entering criteria

Entering criteria

The above example searched my Downloads folder for “license.” The resulting report provided all files with “license” in the name:

Viewing created report

Viewing created report

Copy the script or Download

 

Leave a Reply

Your email address will not be published.