

Now select the email folders to back up.Select Outlook Data File (.pst) and click Next.In the Import/Export Wizard, select Export to file and click Next.One more thing…Subscribe to my newsletter and get 11 free network administrator tools, plus a 30 page user guide so you can get the most out of them. Now your users can backup their PST files – If they remember to do it 🙂 Save it as BackupOutlook.bat and throw it on their desktop.

I added an error handler, so the user will be notified if the copy could not complete. Here is what the final bat file would look likeĬOPY %LOCALAPPDATA%\Microsoft\Outlook\*.pst \\server\backup\%USERNAME% errorlevel 1 goto "= Backup Failed "= Backup Complete "=" The ability to close Outlook (So the user does not have to remember to do this), and a way to find and copy our PST files. y – This allows us to overwrite without being prompted. For our backup, we will copy it to a share named backup, and we will copy it to a folder matching the users name.ĬOPY %LOCALAPPDATA%\Microsoft\Outlook\*.pst \\server\backup\%USERNAME% /y We can use an environment variable to find this. Most of the time PST files are located in the users AppData folder. The bat file will run CloseOutlook.vbs, and then copy the PST files. Now, we will use this script, in combination with a bat file. Set Outlook = CreateObject("Outlook.Application") We will accomplish this with a little bit of VB Script: Now it is not foolproof, but it will work most of the time.įirst, we need our script to close Outlook, that way the PST files will not be in use. I want to have an icon on their desktop that they can click to backup Outlook before they leave for the weekend.

All of my users store their email in PST files in Outlook.

I have a small network of about 10 laptops.
