Backup Exchange Mailboxes with Langmeier Backup

A Langmeier backup script can direct 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 Backup Software Langmeier Backup click "Tools" and then click "Edit Scripts". The script editor will open. Below the script editor, click on the "New" button to create a new script.

Backing up mailboxes, calendars and contacts from an Exchange server is also possible with Langmeier Backup. Here you can learn how to proceed.

Insert 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\"
     '->But the user often enters eg.E.g. C:\bck\.
    '->Convert!
    if mid(sDest, 21) = ":" 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

    BuildFullPath sDest

    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"""

    oFile.WriteLine "Get-MailboxExportRequest | Remove-MailboxExportRequest  -confirm:$false"

    oFile.WriteLine "(Get-Mailbox) | foreach "

    oFile.Close

     'Now the batch file is written:
    set oFile = oFileSystemObject.CreateTextFile(sTempFolder & "\Export.Bat")
    oFile.WriteLine "%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe  -command " & sTempFolder & "\Export.ps1> " & sDest & "\log.txt"

    oFile.Close

    '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"

.

Backing up mailboxes, calendars and contacts from an Exchange server is also possible with Langmeier Backup. Here you can learn how to proceed.

Click 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 on "Script..." 

.

Backing up mailboxes, calendars, and contacts on an Exchange server is also possible with Langmeier Backup. Here you can learn how to proceed.

Select the desired script here, in this case our created script named  "Exchange Database".

Backing up mailboxes, calendars and contacts from an Exchange server is also possible with Langmeier Backup. Here you can learn how to proceed.

Now we've added the script to the job, but we haven't specified a destination yet.

Backing up mailboxes, calendars, and contacts from an Exchange server is also possible with Langmeier Backup. Here you can learn how to proceed.

To specify the destination of the data backup double-click the job line and enter the desired destination path for the destination:

Backing up mailboxes, calendars and contacts of an Exchange server is also possible with Langmeier Backup. Here you can learn how to proceed.

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.At least Langmeier Backup 9 Business (or higher) is required to run the script.

Save data automatically

Protect all your files.

  Buy Now   Try it for free Langmeier Backup for Windows

--- Anzeige ---
Langmeier Backup 8.1 - jetzt testen und sofort Daten sichern!
About the Author , partner support
Sebastian Müller Sebastian Müller is partner and top customer support at Langmeier Software, making him the best person to talk to about Langmeier backup backup solutions.

Phone: +41 44 861 15 70
Email: sebastian@langmeier-software.com
 

Further lookup: Langmeier Backup, Backup, Datensicherung, VB-Script

Articles relevant to the topic
Langmeier Backup Version 10 ist da
FAT32 oder NTFS? Welches Format ist besser für's Backup?
Experten-Tipps: Was ist ein Backup? Gute Datensicherung


Post a comment here...

This article covers:
Langmeier Backup Exchange
Backup Exchange Mailboxes
Backup individual mailboxes
Backup Exchange