Kaseya Community

Script to compact PST file

This question is not answered


Does anyone know a script to execute on outlook to compact the PST file or anything else?


All Replies
  • For wich version of Outlook?

  • Outlook 2007, 2010 and maybe 2003

  • I thought Outlook automatically compacted its pst files when idle?

  • Hi Dan

    It will only do an automatic compact when the system is in idle and no CPU activity. In my case there will be no such luck as the users are constantly busy and when finished they switch it off. We want to schedule a compact PST manually once a month.

  • I spent quite a while trying to find a way to initiate a 'compact pst' command programatically but couldn't find anything.  I did find this product:


    but haven't tried it yet....

  • Hi,

    It is completely true that Microsoft Outlook gives us free outlook compaction option but it is not safe for PST files because sometimes it misplace email files from Outlook mailbox and does not remove and reduce extra spaces, white spaces, virus affected database in PST files. It Is good for those users who have minimum PST files in Outlook folder. But if you have heavy database and want to really save from damages then you have to choose third party tool that is Compress PST software which can delete and clean up deleted items space and zip the heavy attachments in perfect manner.

    Click here for further details: www.outlook.compresspst.com

  • To compact your PST file size, you can go through manual method as I have mentioned the steps below, 

    Step 1: First of all, Open Outlook

    Step 2: Go to View >> Arrange by >> By Date

    Step 3: Now Delete the unnecessary emails which you don’t want to keep and be sure you have permanently removed the items from deleted folder.

    Step 4: Click on ‘Tools’ and then Go to Account Settings

    Step 5: Click on ‘Data’ and then select you PST file which you want to compress

    Step 6: Double click on selected PST file or you can also go to settings.

    Step 7: Now click on the ‘Compact Now’ to compress your PST file 

    The above manual procedure is helpful to reduce the size of Outlook PST file efficiently. However, MS Outlook is carrying very sensitive data file (.PST) so you can take the assistance of any reliable Compact PST tool.
    In my knowledge, users can try the free demo of Stellar Phoenix Compact PST from: http://www.stellarinfo.com/email-repair/compact-pst/compact-pst-tool.php 
  • I actually have no idea about any script to run on Outlook to compact PST file. But Outlook client itself provides a built-in Compact feature that can compact PST fie without running any script or using any 3rd party tool. One can refer to this blog post for complete information - Safely Compact PST File using Outlook Compact Feature | N. Sem's Blog

    There are many software vendors in the market which provide PST compress or compact tool. Before one can purchase any such paid solution, he/she must try Outlook's Compact feature. I hope the shared information would be helpful here. 

    Thanks and best regards.

  • One more application which can reduces the size of large PST file by compressing it. It is extremely well designed to compact extra-large PST files to avoid any type of corruption and to save space in hard drive of the system. Good thing is that company offer free trial version.Visit- www.mannatsoftware.com/stellar-phoenix-compact-pst.html

  • I think the better question to be asking yourself is what can you do to get rid of the need for PSTs.

  • You can simply search in Google. I searched and found this: http://www.softakensoftware.com/compact-pst.html

  • If, you want to compact your Outlook PST file, then you can get some help from here: www.kerneldatarecovery.com/compact-pst.html