I am working on Microsoft Small Business Server 2008 with Microsoft Exchange 2007 installed. From time to time I have a need to export users mailboxes into PST in cases such as employee left company so I keep his mailbox data for archiving purposes.
I am running Backup Assist as the backup tool on the server that supports also backup/export Exchange into PST but you have to install MAPI client on the server – which requires Microsoft Outlook to be installed on the server – that means bad idea – I do not like the part having Microsoft Outlook installed on the server. Server should be kept in clean state so it does what it is designed for.
To accomplish this task you will need few things:
1. computer that runs 32-bit operating system
2. installed Microsoft Outlook 2003 or 2007 on this computer
3. installed Microsoft Exchange Management Tools (Exchange 2007 SP1 or up)
4. the user on this computer must be an Exchange Organization Admin or Server admin in order to perform the export/import tasks
Once you have installed all the required tools on the computer do this:
- in my case I have it on Windows XP SP3 machine – go to Programs>Microsoft Exchange Server 2007>Exchange Management Shell
- Exchange Management Shell window will open
- now type in PowerShell command to export the mailbox for user to (in my case to C:PST> folder)
here is the command:
Export-Mailbox -id "John.Doe" -PSTFolderPath C:PST
Once you press enter you will be prompt to confirm and the export of mailbox will begin.
Because Sysadmins are “lazy” there is way to do this way better way without answering the question and pressing extra options. This can be done by adding to the PowerShell command. Here is the new command to export my mailbox from Exchange 2007 on SBS 2008 to PST without extra key pressing to confirm:-)
Export-Mailbox -id "John.Doe" -PSTFolderPath C:PST -confirm:$false
By adding the -confirm:$false you won’t be ask to confirm and the task will be executed.
Once the command (task) completes you will have your user mailbox exported to PST file. To make this even more effective you can create a file where you write per line the command per user and save it as Export2PST.ps1. Next time you just run this Export2PST.ps1 file in the Exchnage Shell to export multiple users without interaction.
Export-Mailbox -id "John.Doe" -PSTFolderPath C:PST -confirm:$false Export-Mailbox -id "John.Smith" -PSTFolderPath C:PST -confirm:$false Export-Mailbox -id "Andrew.Smith" -PSTFolderPath C:PST -confirm:$false
This way it will be more simple instead of typing in every user 🙂 There is more option to play with such as export only emails with certain key words, languages or skip certain folders in user mailbox .. only sky is the limit .. PowerShell is very powerful tool to manage your Exchange server.