Couldn’t find the Enterprise Organization container when using New-MailboxExportRequest
While using the New-MailboxExportRequest cmdlet in the Exchange Management Shell I encountered the following error:
Couldn’t find the Enterprise Organization container
This issue occurs if the user running the New-MailboxExportRequest command isn’t assigned the Mailbox Import Export role. There wasn’t already an AD group in place for this role so I created one and granted the appropriate rights in Exchange using the New-ManagementRoleAssignment cmdlet:
New-ManagementRoleAssignment -Name "Exchange Import Export" -SecurityGroup "Exchange Import Export users" -Role "Mailbox Import Export"
After adding the user to the new group, logging off and on again, I can successfully use the New-MailboxExportRequest cmdlet