windows command line to scan remote computers for .pst

Is there a simple command line, or tool,  that we can use to scan remote domain joined computers to see if they have any .pst files on them, and if so, report on their sizes?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Any command will take a while since you have to look through all domain USERS folders for PST files.

That said, open Command.exe and try FIND. That should work.
drichmanAuthor Commented:
Could you assist with the syntax for the find command? We are looking for *.pst on the C: drive on remote computers.
Andrej PirmanCommented:
If you want to do it on regular base, this app might come handy. You setup parameters, domain, admin and password in main program interface, then go to WEB SERVER tab, START it and do search using web interface.
Price Your IT Services for Profit

Managed service contracts are great - when they're making you money. Yes, you’re getting paid monthly, but is it actually profitable? Learn to calculate your hourly overhead burden so you can master your IT services pricing strategy.

NVITEnd-user supportCommented:
Using CMD..

1. Make stns.txt containing computer names...

Open in new window

2. Download and extract psexec

3. Open cmd window as domain admin.

4. Run psexec, sending output to c:\pstfiles.txt

a. find /v "too long" filters out the possible extraneous info when the DIR command is run
b. If your pst files reside in different folders than c:\users, adjust as needed.
psexec @stns.txt cmd /c dir /s "c:\users\*.pst" | find /v "too long" >> c:\pstfiles.txt

Open in new window

5. View results in c:\pstfiles.txt
JohnBusiness Consultant (Owner)Commented:
@drichman  - FIND is not particularly optimal for what you want. DIR works better. I have tried this locally and it finds my PST files.

The post above (just before I posted) outlines a nice way to use DIR.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
NVITEnd-user supportCommented:
This version puts the computername at the beginning of each DIR scan:

psexec @stns.txt cmd /c "echo %%computername%% -------------- & dir /s "c:\users\*.pst" | find /v "too long"" >> c:\pstfiles.txt

Open in new window

John Hurst is correct about using the DIR command...

You can use:

dir *.pst /s  

to scan each hard drive, and check all subdirectories (/s) on them...

You can also use /p to pause as each command windows fills to prevent scrolling off the screen if watching...

Be sure to change to root directory first, or it will scan from the current directory down...
I've requested that this question be deleted for the following reason:

Not enough information to confirm an answer.
JohnBusiness Consultant (Owner)Commented:
Answers http:#a41190024 ; http:#a41190054 ; and http:#a41190288  correctly address this issue. Suggest 3-way split
NVITEnd-user supportCommented:
Neither 41190288 nor 41190024 addresses remote scans across domain computers. A split, if any, should be more like:
80% 41190054
10% 41190288
10% 41190024
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows OS

From novice to tech pro — start learning today.