Enable Export-Mailbox and Import-Mailbox commands on Exchange 2010 & Exchange 2013

You might have faced this issue at some point that when trying to execute the Export or Import command on EMS for the first time. The error may indicate that such command does not exist. In order to resolve this, you have to perform the following :->

  • Check and confirm if the Exchange Server Admin tasks are installed in Exchange Management Shell, by trying to execute the command Get-PSSnapin
  • If not possible, it means that its is not included in the list. In that case execute the below command Get-PSSnapin -registered
  • To install the required Admin tasks for the server, execute the command Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010


Note: For Exchange Server 2007, execute the command Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin

  •  In order to provide multiple users or groups permission to run these commands, execute the below command “New-RoleGroup -Name “Exchange Mailbox Import Export” -Roles “Mailbox Import Export” -Members “<yourdomain\yourgroupname>” -DisplayName “”Exchange Mailbox Import Export” -Description “This group handles permissions to the import and export commands in powershell.”


Note: Command to delete email from all mailboxes in Exchange 2010 & Exchange 2013 

Get-Mailbox -Database mdb | Export-Mailbox -SubjectKeywords “New” -DeleteContent 

Where mdb is the Mailbox Database and New is the email subject.

Also, the below command should be executed to have the permission to run the above command

get-mailbox -Database “Mailbox Database”| add-mailboxpermission -user administrator -AccessRights FullAccess



Reference :




Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s