Enable-RemoteMailbox to create mailbox on Exchange Online when user is created in on-prem Active Directory

Nilesh Ghorpade 1 Reputation point


I am looking for an option to create a mailbox on Exchange Online when a user is created in my on-prem Active Directory. However I do not want to maintain my hybrid exchange server. I would like the Enable-RemoteMailbox executed from a non-exchange Windows Server.

Can I execute the Enable-RemoteMailbox from a non-exchange Windows server?

If yes what is the module I need to install to use the Enable-RemoteMailbox cmdlet/function from my powershell script.

Thank you.

Microsoft Exchange Hybrid Management
Microsoft Exchange Hybrid Management
Microsoft Exchange: Microsoft messaging and collaboration software.Hybrid Management: Organizing, handling, directing or controlling hybrid deployments.
1,908 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Vasil Michev 96,676 Reputation points MVP

    You need to keep at least one Exchange box for management purposes and tasks like this one. While technically you can run the PowerShell cmdlet remotely from any machine within your environment, it still needs to be proxied through an Exchange server, so there's no way for such scenario to work without an actual Exchange box.

    0 comments No comments

  2. Lucas Liu-MSFT 6,161 Reputation points

    Hi @Anonymous ,
    You could run the following command in the Winodws PowerShell to connect to Exchange server by using remote PowerShell. This is so that those local computers that have not installed the exchange management tool can also manage the Exchange server. But as michev said, if you want to ensure that the command line can be executed normally, then you need to ensure that your Exchange server can work normally.

    $UserCredential = Get-Credential  
    $Session = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://<ServerFQDN>/PowerShell/ -Authentication Kerberos -Credential $UserCredential  
    Import-PSSession $Session –DisableNameChecking  

    For more information you could refer to: Connect to Exchange servers using remote PowerShell

    Below screenshot is the test in my lab environment:


    If the response is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.