Link to home
Start Free TrialLog in
Avatar of goprasad
goprasad

asked on

Script to delete *.pst files from a user profile share

Hello there,

I would like to run a script to delete *.pst file in each of the users profile located in profile share directory.

Please assist.

Thanks and Regards
ASKER CERTIFIED SOLUTION
Avatar of John
John
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of NVIT
NVIT
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of goprasad
goprasad

ASKER

Yep will ensure that that the outlook is not running. user's *.pst files are located in network share in Citrix users profile
\\servername\Profiles$.
del /s "\\servername\Profiles$\*.pst"  - this command will delete pst files located in Profiles$

and what does the following command do?

>"%temp%\DeletedPSTs.txt"
The last command pipes the output to a text file for reference.
@goprasad  - Thanks, and I was happy the help you.
Thanks for the update,  goprasad. I'm glad it worked for you. Have a nice day...