Environment: Windows Server, Active Directory
Description: This script was used to find pst files on user's desktop systems. This was used with a higher level script that included all employee's and their comptuer name. This was final phase of getting all Outlook pst files back into our Exchange/EAS email system.
Code:
rem FindPST.cmd
rem Parm1 Computer Name Required
rem Parm2 Domain Admin User Required
rem Parm3 DA password Required
rem T:w (last written to), T:a (last access)
ECHO Checking %1 on C drive on %DATE% at %TIME%
ECHO Checking %1 on C drive on %DATE% at %TIME%>>FindPST.txt
PING %1>> FindPST.txt
NET USE \\%1\ipc$ %3 /USER:soka\%2
DIR \\%1\c$\*.pst /S /Q /T:w>> FindPST.txt
NET USE \\%1\ipc$ /DELETE
No comments:
Post a Comment