I did something along these lines
Code:
$pstLocation = '%userprofile%\Local Settings\Application Data\Microsoft\Outlook\%username%.pst'
$pstFileSize = getFileSize($pstLocation)
$pstSize = $pstFileSize / (1024 * 1024)
we force the .pst location by way of the outlook profile generator. we chose the default microsoft location for the saving of the .pst to keep things simple. if you know where the pst file is and its name, then you are set!
we use an if statement to qualify the size we are looking for. if it is too big, we use telnet to send an email. (would use CDONTS but are not configured to access the IIS server)
If you don't know where the .pst is located, you can look for it in the registry. you should be able to locate them in HKCU\Software\Microsoft\WindowsNT\CurrentVersion\Windows Messaging Subsystem\Profiles\<<username>>
NOTE: default <<username>> is "Microsoft Outlook Settings" or something like that...
hope this helps.
Edited by jechilt (2004-08-03 12:12 PM)
_________________________
John
LM Contractor
One of the
2 dads