Wednesday , August 12 2020

Office 365 Mailbox not showing in Hybrid Exchange server

Newly created Mailbox not showing in Hybrid Exchange Server Control Panel.Not all administrators certainly know that they should not provision office 365 mailbox directly from the office 365 console. They should have used the Hybrid server to provision new cloud mailboxes.

User Created Directly on Active Directory and created a mailbox on Office 365 without using the hybrid server. Creating an issue on some mailboxes not visible in hybrid server

Below Commands will enable you to get the mailbox under Get-RemoteMailbox in Hybrid Exchange server.

Run on Azure AD Connect Server or Hybrid Exchange server with Active Directory Tools installed.

Please replaceĀ  domain / on 3 rd and 4th line with your appropriate domain names. You can get these info from a working mailbox.

$uid = read-host "Please enter username"
$mailnick = read-host "Please enter same username"
$tempmail = $uid+""
$primarymail = $mailnick+""
Set-ADUser $uid -Clear homemdb, homemta, msExchHomeServerName, msExchPoliciesExcluded
Set-ADUser $uid -Add @{msExchRemoteRecipientType="4"}
Set-ADUser $uid -Add @{mailNickname="$mailnick"}
Set-ADUser $uid -Add @{msExchProvisioningFlags="0"}

Set-ADUser $uid -Add @{msExchModerationFlags="6"}
Set-ADUser $uid -Add @{msExchAddressBookFlags="1"}
Set-ADUser $uid -Replace @{targetaddress="$tempmail"}
Set-ADUser $uid -Replace @{msExchRecipientDisplayType="-2147483642"}
Set-ADUser $uid -Replace @{msExchRecipientTypeDetails="2147483648"}
Set-RemoteMailbox $uid -PrimarySMTPAddress $primarymail

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Office Server and Services MVP , Publisher of Specialized in Office365 / Microsoft Exchange / Virtualization , Sathesh is an Messaging Expert supporting/Designing/Deploying many medium size businesses to large enterprises when it comes to Corporate messaging and Virtualization Infrastructure

Check Also

Power BI Data Gateway with Active Directory

You can create amazing reports with Active directory information with live refresh . It saves …


  1. Can you give a description and a reason for each of the flags? Particularly, msExchModerationFlags=”6″ and msExchAddressBookFlags=”1″; possibly msExchProvisioningFlags=”0″. We’ve been going through our hybrid system, trying to make sure we’ve got things right. Usually, it works without any of the three that grabbed my curiosity above.

  2. just enable-remotemailbox for the user and specify the remote routing address as part of the commandlet.

  3. It works like a charm, thanks you.

Leave a Reply

Your email address will not be published.