Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have some rather large Outlook PST files left over from previous employees. Some of these are connected to Outlook (2003 and 2007) accounts in the enterprise, and seem to be getting flagged for backup even though the contents don't change (as far as I can tell, anyway.)

Now I could just ask each user on the network whether they are doing this, or I could find out somehow through the network. If I wanted to do the latter, how would I get it done?

share|improve this question
    
What version of Outlook? –  squillman Aug 19 '09 at 2:29
    
FYI, this is not supported by Microsoft, and when you do find out who is using them, you should eliminate them, or move them locally, if possible. support.microsoft.com/kb/297019 –  DanBig Aug 19 '09 at 15:51

3 Answers 3

up vote 0 down vote accepted

Try something like the below script as a logon script.

It is a mix of scripts from the following pages

http://blogs.msdn.com/brijs/archive/2009/05/06/remove-all-pst-from-the-outlook-mailbox-using-vbscript.aspx

http://www.visualbasicscript.com/m44947.aspx

Set objOL = CreateObject("Outlook.Application")
Set objFolders = objOL.Session.Folders

For j = objFolders.Count To 1 Step -1
    Set objFolder = objFolders.Item(j)

    If (InStr(1, objFolder.Name, "Mailbox") = 0) And (InStr(1, objFolder.Name, "Public Folders") = 0) Then
	WScript.Echo objFolder.Name
	WScript.Echo GetPSTPath(objFolder.storeid)

End If
Next

Function GetPSTPath(input)
For i = 1 To Len(input) Step 2
	strSubString = Mid(input,i,2)
	If Not strSubString = "00" Then
		strPath = strPath & ChrW("&H" & strSubString)
	End If
Next

Select Case True
Case InStr(strPath,":\") > 0
	GetPSTPath = Mid(strPath,InStr(strPath,":\")-1)
Case InStr(strPath,"\\") > 0
	GetPSTPath = Mid(strPath,InStr(strPath,"\\"))
End Select
End Function
share|improve this answer

Ive never really had the need for this butyou could write a script that gets the PST's in use on a local computer. Take that script and run it automatically via active directory to build a list of PST/Usernames

share|improve this answer

You could look in Computer Management on the server they are on (I assume they are on a server) and look to see who's got the files opened via the network shares.

share|improve this answer
    
This would work, but only if that user happens to have the file open at that time. –  DanBig Aug 19 '09 at 15:52
1  
Most users will attach a PST file and leave it there. As long as Outlook is open, there should be a file handle on the server open. Since Outlook is the one app that 99% of employees will have open all day, odds are you'll see the connection. –  mrdenny Aug 19 '09 at 18:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.