The term 'New-RemoteMailbox' is not recognized as the name of a cmdlet

Trying to create the new remote mailbox for O365 (on-premis mailox does not exists).

I'm establishing connection to local Exchange server (either by EMS or by Invoke-Command PowerShell) and try to execute New-RemoteMailbox command. After this I'm getting error:

The term 'New-RemoteMailbox' is not recognized as the name of a cmdlet...

Have someone faced such problem? That is strange as well as I using EMS that needs to have all cmdlets..


Solution 1:

The user running that command needs to be assigned to the Mailbox Import/Export role. If you are not part of that role you will get the above message.

New-ManagementRoleAssignment -Role "Mailbox Import Export" –User <domain\user>