I was listening to the latest episode of the Casting from the Server Room podcast this morning, and one of the discussions was about backing up an Outlook .pst when users leave Outlook open overnight, which is when the backup is scheduled to run.
In order to back an Outlook .pst file, the .pst file must not be in use. The easiest way to make sure the .pst file isn’t in use is to close Outlook on the computer the .pst resides on.
On Error Resume Next
Set Outlook = GetObject(, “Outlook.Application”)
If Err = 0 Then
Just killing Outlook can result in .pst corruption, so I don’t suggest using a program like pskill to terminate outlook.exe.
You can schedule these scripts to run nightly with a Windows Scheduled Task, or with a program like psexec, which will execute programs on remote machines through a command line or script.