Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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. – DanBig Aug 19 '09 at 15:51
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

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

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

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

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
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

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

Your Answer


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.