List mounted PST files with PowerShell

Need to get a list of PST files in use in your enterprise? Look no further!

This script should be run with the logged on user’s privileges i.e. not elevated. It must be run on each PC individually e.g. with an SCCM package.

 

In order to make the script execution transparent for the end user, I used a PowerShell App Deploy Tool package which was then deployed by SCCM. To make sure the script was accessible for the regular user account, I used the PS App Deploy Toolkit cmdlet “Copy-File” like this:

To execute the script as the logged on user, I used the PowerShell App Deploy Tool cmdlet “Execute-ProcessAsUser”, which creates and triggers a scheduled task:

The script will create a single CSV file for each PC you deploy to. To make this into one big CSV file, I used the following script:

 

2 Comments

Join the discussion and tell us your opinion.

Rubenreply
2018-02-23 at 16:45

Exactly what I need! Thanks for sharing!

windowstechreply
2018-02-26 at 10:21
– In reply to: Ruben

Thanks…glad you could use it 🙂
Actually I just tweaked it a bit. Apparently some users put commas “,” in their PST file names!!! So i changed the formatting of the output files to semicolon separated instead of of comma separated.

Reply to Ruben Cancel reply

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