Thursday , April 19 2018

Office 365 Mailbox not showing in Hybrid Exchange server

Newly Created Mailbox not showing in Hybrid Exchange Server Control Panel.

User Created Directly on Active Directory and created a mailbox on Office 365 without using the hybrid server.

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

image

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


$uid = read-host "Please enter User's username"

$mailnick = read-host "Please enter User's mail nickname"

$tmail = $uid+"@domain.mail.onmicrosoft.com"

$pmail = $mailnick+"@domain.com"

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="$tmail"}

Set-ADUser $uid -Replace @{msExchRecipientDisplayType="-2147483642"}

Set-ADUser $uid -Replace @{msExchRecipientTypeDetails="2147483648"}

Set-RemoteMailbox $uid -PrimarySMTPAddress $pmail

About Satheshwaran Manoharan

Satheshwaran Manoharan is an Microsoft Exchange Server MVP , Publisher of CareExchange.in
Supporting/Deploying/Designing Microsoft Exchange for some years.
Extensive experience on Microsoft Technologies.

Check Also

SQL 2008 R2 In place Upgrade to SQL 2014

I have a SCCM Database server running Windows Server 2012 R2 with SQL 2008 R2 ...

One comment

  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.

Leave a Reply

Your email address will not be published.