skip to Main Content

New-MailboxExportRequest is not recognized in Exchange Server

We need to export a mailbox to PST file. The problem is that we are getting an error after running the New-MailboxExportRequest cmdlet. The term ‘New-MailboxExportRequest’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. After the error, it did not export the mailbox to PST in Exchange Server. In this article, you will learn why this is happening and the solution to New-MailboxExportRequest is not recognized.

New-MailboxExportRequest is not recognized

Run Exchange Management Shell administrator. Run the New-MailboxExportRequest cmdlet including -Mailbox and -Filepath parameter.

After running the cmdlet, the output is giving us the following error:

New-MailboxExportRequest : The term ‘New-MailboxExportRequest’ is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

Why are we getting this error and what is the solution for new mailbox export request is not recognized?

Get role Mailbox Import Export

Let’s find out who is assigned to the role Mailbox Import Export. Make use of the Get-ManagementRoleAssignment cmdlet.

What if you have a long list and you like to filter the result? Let’s search and filter on the account name.

If you inspect closely, you will find that the assignment grants Organization management members like you only have delegation rights. This allows you as organization administrator to decide who can run Mailbox Import Export cmdlets.

Why are these roles not assigned to anyone by default?

When you assign the role “Mailbox Import Export”, it also grants full access rights to all mailboxes in its scope. Since this can be a security issue, it is not assigned to anyone by default.

By default nobody have access to import and export mailboxes in Exchange Server.

Solution for New-MailboxExportRequest is not recognized

In my example, the Administrator account is assigned to a Role Group called Organization Management. That group has access to the role Mailbox Import Export Delegating. We have to add the admin account to the role.

If the admin account is not added to the role, you are not able to run the cmdlet. This will not give you access to export mailboxes to PST.

We have two options:

  1. Add admin account directly to the role
  2. Create a new role group and add admin account to that group

I recommend option 2.

After giving the permissions, close Exchange Management Shell and run it again for changes to take effect.

Option 1. Add admin account directly to the role

Run the following cmdlet to give the admin account access to the role.

The account is successfully assigned to the Mailbox Import Export role.

Verify the permissions

You can double-check if you have access to the role with the first cmdlet in this article.

The admin account is Direct assigned to the role. Restart Exchange Management Shell and run the Mailbox Export cmdlet. The New-MailboxExportRequest is not recognized error is gone.

Option 2. Create a new Role Group and add admin account to that group

Run the following cmdlet to create a new role group and assign the admin account to that group.

The role group is successfully created and the admin account is a member of the role group.

Verify the permissions

Go to Active Directory and open the OU Microsoft Exchange Security Groups in the root domain of the forest. A new Universal Security Group is created with the name Exchange Mailbox Import Export.

New-MailboxExportRequest is not recognized in Exchange Server new Universal Security Group

You will also notice the admin account we specified is added as members.

New-MailboxExportRequest is not recognized in Exchange Server security group members admin

Now that you have the permissions, read the article Export Exchange mailbox to PST with PowerShell.

Remove permissions from the role

Security-wise it’s good to remove the permissions after you’re done with the mailbox to PST export.

If you followed option 1. Remove the admin account from the role.

If you followed option 2. I recommend to keep the role group, only delete the admin account from it.

If you need to export a PST in the future, you can always add the admin account to the group.

If you want to remove the created role group, run the following cmdlet.

Conclusion

In this article, you learned why New-MailboxExportRequest is not recognized in Exchange Server. Add the admin account directly to the Mailbox Import Export role. After assigning the permissions, restart Exchange Management Shell. Don’t forget to remove the assigned role permissions when the PST export is finished. The Microsoft Exchange team has written about this. If you enjoyed this article, you may also like DFSRDIAG POLLAD is not recognized. Don’t forget to follow us.

ALI TAJRAN

ALI TAJRAN

ALI TAJRAN is a passionate IT Architect, IT Consultant, and Microsoft Certified Trainer. He started Information Technology at a very young age, and his goal is to teach and inspire others. Read more »

This Post Has One Comment

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top