Exporting Exchange Contacts (2013/2010/2007) to PST/CSV- PowerShell Command
Summary: You can use PowerShell commands in Exchange Server to export mailboxes and other data to PST format. In this post, we will discuss the process of exporting Exchange contacts to PST using PowerShell commands. We will also mention an EDB converter software that can help you to easily and quickly export contacts from EDB file to PST and other formats.
Exchange Server mailbox database stores information, such as emails, contacts, attachments, journals, notes, etc. Among all these items, contacts have their own importance as these help connect with the customers, clients, and employees. Thus, it’s important to back up the contacts to keep them safe and secure from any incident or issue, like server crash, database corruption, cyber-attack, etc.
To create a backup of contacts from selected mailboxes, you can place a request to the backup department who creates a point-in-time snapshot of the “Contacts” folder for those mailboxes. However, this may take a lot of time. To quickly back up contacts from Exchange database anytime, you can use the New-MailboxExportRequest PowerShell commands in Exchange Management Shell (EMS). This will help you export Exchange Contacts from selected mailboxes to PST file at your preferred location. In addition, unlike snapshots, you can import the PST file into any Outlook profile or Exchange Server database to access the contacts.
In this post, we will be discussing how to export Exchange Contacts to PST file by using PowerShell commands.
Process to Export Exchange Contacts to PST using PowerShell Commands
Depending upon the version of Exchange Server you are using, follow the given instructions to export the Exchange Contacts to PST/CSV through PowerShell.
Prerequisites
To export global address book or contacts to PST/CSV, the user must have the import/export role and access to Exchange Management Shell.
To assign the Import/Export role to the user account in Exchange 2007, use the following PowerShell cmdlet:
Add-MailboxPermission -Identity “MailboxID” -User “UserName” -AccessRights Full Access
This command will assign the “UserName” full permission to the “MailboxID” mailbox.
In Exchange Server 2010, 2013, 2016, and 2019, execute the below PowerShell cmdlet to assign the appropriate permissions:
New-ManagementRoleAssignment -Role "Mailbox Import Export" -User
Add-RoleGroupMember “Mailbox Import-Export Management” -Member <user to give rights to>
Export Contacts to PST File
Now that the user account has required permissions and roles assigned, you can export Exchange contacts to PST by using the following PowerShell commands in Exchange Management Shell (EMS).
To export contacts from Exchange mailbox database in Exchange 2007, run the following cmdlet:
Export-Mailbox -Identity <MailboxUserID> -IncludeFolders ‘\contacts’ -PSTFolder_Path <Path\filename.pst>
In the above cmdlet, replace <MailboxUserID> with your mailbox user ID, such as abc@xyz.com and provide the –PSTFolder_Path location by replacing <Path\filename.pst>. The parameter -IncludeFolders includes the Contact folder for export to PST file.
To export contacts in Exchange Server 2010, 2013, 2016, and 2019, you can use the New-MailboxExportRequest
command as given below:
Note: If you’re using Exchange Sever 2010, then it should be updated to Service Pack 1 (SP1) to run this command in EMS.
New-MailboxExportRequest -Mailbox UserName -IncludeFolders "#Contacts#" -ExcludeDumpster -FilePath \ExchSrv\FolderName\FileName.pst
In the above cmdlet, UserName is the mailbox from which you want to export Contacts to PST.
An Easy and Quick Way to Export Exchange Contacts to PST
As you can see, the above commands can help you export Exchange contacts from individual mailboxes to PST file. Thus, you will have to run these commands repeatedly to export contacts from other mailboxes that are stored in the Exchange database (EDB) file. This could take several hours or days to complete the export.
If you need to quickly export all contacts or contacts from a few selected mailboxes in Exchange database files to PST, you can use a professional EDB converter software, like Stellar Converter for EDB. This proficient software can easily convert data in EDB files to PST format that you can directly import into Outlook or Exchange Server. With this tool, you can extract all mailbox components, such as emails, contacts, notes, etc. and export them to separate PST files. This DIY software is equipped with interactive GUI and compatible with multiple versions of Exchange.
Here are the steps to export Exchange contacts to PST by using Stellar Converter for EDB:
- First download, install, and launch the software
- On the home page of the software, you will see two options – Offline EDB and Hosted Exchange. Select ‘Offline EDB’ if you want to export contacts from Offline EDB file. You can select ‘Hosted Exchange’ if you want to export contacts from Live Exchange Server. Here, we’re selecting “Offline EDB.”
- Click ‘Browse’ if you know the EDB file location or click ‘Find’ to search the EDB file located anywhere on your computer. Once you find the required EDB file, select it and click Next.
- After scan, all the mailbox items will be populated in a tree-view structure in the software’s left-hand panel.
- You may preview any item by right-clicking on it and selecting “Preview”.
- Once satisfied, select the mailbox folder (contacts) and click ‘Save’ from the File menu. Select ‘PST’ to save the contacts in PST format. Also, specify the location where you want to save the converted PST file.
You can also export and save the Exchange contacts to CSV format by using Stellar Converter for EDB software. The software interface features a ‘Save Contacts’ button under the ‘Tools’ tab. This allows to export all the contacts in just a few clicks, including the Global Address List. You can find the option to view all the contacts in the mailboxes by clicking on the ‘Contacts’ tab at the bottom, after scan. Then, select the contacts list and export to CSV file.
In case of Hosted Exchange, you can export Global Address List or GAL to CSV format. For detailed steps, you can follow this link.
Conclusion
You can export Exchange Contacts to PST/CSV using the PowerShell commands. However, it requires technical knowledge and careful execution of commands. Moreover, you need to execute these commands repeatedly to export contacts from multiple mailboxes. So, use the PowerShell commands when you need to export Exchange contacts from a few mailboxes on the server. To quickly and easily export contacts from the Exchange database, you can use Stellar Converter for EDB. This software allows you to export contacts from all or selected mailboxes to PST at once. It can also export contacts from EDB file to CSV format.
FAQs
A. Yes, you will need special permissions/roles to execute the PowerShell commands to export the data as only the authorized users/service accounts can perform this operation
A. Yes, PowerShell commands offer some filtering options based on name, department, location, and other parameters.
A. When it comes to handling of large contacts list and large data exports, it might be an issue. In addition, you need to look at the regulatory and data protection needs when it comes to organizational policies on the data privacy when exporting from the system
A. First, you must check and ensure that the prerequisites are met and the permissions on the user as well as on the shared folder to host the files are set and correct. Check the syntax of the command for any extra spaces or special characters. If the problem persists, check the server configuration.
A. Yes, you can automate the export process and schedule recurring exports of Exchange contacts using the PowerShell scripts.
A. Although exporting the contacts using the PowerShell commands is generally safe and reliable, you need to consider the network or connectivity issues and the performance of the server. You should follow the best practices when it comes to exporting large amounts of data or several mailboxes at once to ensure that there is no potential risk.
Can this be setup on a schedule to export a specific user’s Contacts and Calendar?
I need to do that on a nightly basis.
Hi Angel,
You can export data for any individual contacts or emails.
But, it doesn’t give the option to export data on customize time duration.
Our organization need to export Exchange Offline Address Book or Global Address List (GAL) via Outlook. Please guide us.
Using the third party solution like Stellar Converter for EDB, you can easily export mailbox contacts to PST file format without any technical knowledge.
When I run PowerShell commands I got the following error message:
“New-MailboxExportRequest Access to Path is Denied”
Please provide a solution.
You can resolve this error by implementing different methods explained in below blog.
Visit: here
I want to export MS Exchange 2013 contacts to PST file format without recoverable items folder. How I can perform it?
You can run the following cmdlet command to export mailbox.
New-MailboxExportRequest -Mailbox user_name -IncludeFolders “#Contacts#” -excludedumpster -file_path\\server_name\efg\filename.pst
After reading your blog post I don’t want to try PowerShell command. It’s too lengthy and time-consuming method.
So, our team has decided to go with an automatic solution i.e. Stellar EDB to PST Converter. Hope, it will save our valuable time to increase our productivity.
After running PowerShell command, I have noticed that 40% contacts are missing.
WHY?
PowerShell command doesn’t give 100% guarantee for a safe conversion.
Is it safe to run PowerShell command? Earlier, I had never used this practice for extracting contacts from Exchange server database file.
Yes, you can run it. It is safe.
When I tried running the cmdlet command you recommended and I was getting “Couldn’t connect to the source mailbox.” Error.
But thankfully with the help Stellar Converter for EDB, I’ve exported all my exchange contacts to PST format perfectly.