Kaseya Community

Script to Backup Outlook pst files

  • Does anyone know a script that can backup Microsoft Outlook pst files?

    Legacy Forum Name: Script to Backup Outlook pst files,
    Legacy Posted By Username: chibuzor.mbuka
  • Well, the default location for PSTs are %localappdata%\microsoft\outlook

    A script that does "copy %localappdata%\microsoft\outlook\*.pst \\somedestination" should do the trick.

    the problem is when the PSTs are not in the default location. Then you're looking at a VBScript (or something similar) to search for all PSTs (can be done fairly easily and quickly), and then copy those files somewhere...

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: Lmhansen
  • do you hv a sample script?

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: chibuzor.mbuka
  • To search for PST files?

    VBScript:

    strComputer = "."
    Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

    Set colFiles = objWMIService.ExecQuery _
    ("Select * from CIM_DataFile Where Extension = 'pst'")

    For Each objFile in colFiles
    Wscript.Echo objFile.Drive & objFile.Path
    Wscript.Echo objFile.FileName & "." & objFile.Extension
    Wscript.Echo objFile.FileSize
    Wscript.Echo
    Next



    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: Lmhansen
  • Have a look at pfbackup. This is an Outlook Add-in that copies the PST when closing Outlook or using a time frame. You can define the location where to backup the PST file so you have more control over it.

    Legacy Forum Name: Kaseya Services and Support,
    Legacy Posted By Username: BertHaver
  • For working out like trouble you may use pst repair tool outlook 2003. It can work with invalid pst files bigger than 2 gb. The tool doesn't modify source data during restoration. Starts under all supported Windows OS and software configurations of your system.

  • Look at this

    You can download a command line tool named shadowspawn on the link below.

    github.com/.../downloads

    this tools uses VSS, so you can even copy the files while they are used by outlook.

    ShadowSpawn.exe c:\email x: robocopy x:\ i:\email /MIR