0

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?

bugmagnet
  • 236
  • 1
  • 3
  • 15
  • What version of Outlook? – squillman Aug 19 '09 at 02: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. http://support.microsoft.com/kb/297019 – DanBig Aug 19 '09 at 15:51

3 Answers3

1

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.

mrdenny
  • 27,074
  • 4
  • 40
  • 68
  • 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
0

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

J Sidhu
  • 440
  • 2
  • 4
0

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
mmcg
  • 390
  • 4
  • 11