A Langmeier Backup script can instruct a Microsoft Exchange server to export individual mailboxes to external PST files. These PST files can then be backed up by Langmeier Backup. Mailboxes backed up in this way can be restored individually.
How to set up the script for Exchange servers
In the main window of the Backup Software Langmeier Backup, click "Tools" and then "Edit Scripts". The script editor will open. Below the script editor, click on the "New" button to create a new script.
Paste the following script into the script editor:
Dim oFileSystemObject, oFile
set fso = CreateObject("Scripting.FileSystemObject")
sDest = Destination &""
'The script needs the path to be a UNC path in the form "\\localhost\c$\bck\" '->However, the user often enters e. g.For example, C:\bck\. '->Convert! if mid(sDest, 2, 1) = ":"then 'An LW letter is specified with in the destination path, example C:\xyxy '->Replace with $ sDest = left(sDest, 1) &"$"&mid(sDest, 3) ' ...and put a localhost up front: sDest = "\\localhost\"& sDest &"\" end if
' Now the Temporary Folder is determined: set sTempFolder = fso.GetSpecialFolder(2)'2 = TemporaryFolder
'This is where the Powershell script is written: set oFileSystemObject = CreateObject("Scripting.FileSystemObject") set oFile = oFileSystemObject.CreateTextFile(sTempFolder &"\Export.ps1") oFile.WriteLine "Add-PSSnapin ""Microsoft.Exchange.Management.PowerShell.E2010"""
'Now writing the batch file: set oFile = oFileSystemObject.CreateTextFile(sTempFolder &"\Export.bat") oFile.WriteLine "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe -command "& sTempFolder &"\Export.ps1 >"& sDest &"\log.txt"
'Note the path to Langmeier Backup here: Shell "C:\Program Files (x86)\Langmeier Software\Langmeier Backup\tools\Shell64.exe" & sTempFolder &"\Export.bat"
Sub BuildFullPath(ByVal FullPath) If Not fso.FolderExists(FullPath)Then BuildFullPath fso.GetParentFolderName(FullPath) fso.CreateFolder FullPath End If End Sub
Now save this script by clicking "Save As...". This button is located below the script editor. Enter the desired file name, for example "Exchange Database".
Click on the "Backup" tab at the top of the Langmeier Backup main window. Add the newly created script by clicking on the text at "Add" and then "Script...".
Select the desired script here, in this case our created script named"Exchange Database".
Now we've added the script to the job, but we haven't specified a destination yet.
To specify the destination of the data backup, double-click the job line and enter the desired destination path for the destination:
Now all you have to do is start the backup, and the Exchange backup will appear in the form of „.pst“ files that can be imported into Outlook at the specified destination path.
System Requirements: This script works with Microsoft Exchange Server 2003 (64-bit), Exchange Server 2007 (64-bit), Exchange Server 2010, and Exchange Server 2013, and requires at least Langmeier Backup 9 Business (or higher) to run.