Ammar's Blog

upgrade the discovery mailboxes to R5 version, this will fix the RecipientDisplayType property of the discovery mailbox which was wrong in R4

Microsoft Exchange

upgrade the discovery mailboxes to R5 version, this will fix the RecipientDisplayType property of the discovery mailbox which was wrong in R4

During the Exchange 2013 upgrade to latest CU23, on the Step 5th out of 9, during the Mailbox Server Role I got the below error and solution is provided below.

Error:

The following error was generated when “$error.Clear();

if (($RoleIsDatacenter -ne $true) -and ($RoleIsDatacenterDedicated -ne $true))

{

if (test-ExchangeServersWriteAccess -DomainController $RoleDomainController -ErrorAction SilentlyContinue)

{

# upgrade the discovery mailboxes to R5 version, this will fix the RecipientDisplayType property of the discovery mailbox which was wrong in R4.

get-mailbox -RecipientTypeDetails DiscoveryMailbox -DomainController $RoleDomainController | where {$_.IsValid -eq $false} | set-mailbox -DomainController $RoleDomainController

$name = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName;

$dispname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName;

$mbxs = @( get-mailbox -Filter {name -eq $name} -IgnoreDefaultScope -resultSize 1 );

if ( $mbxs.length -eq 0)

{

$dbs = @(get-MailboxDatabase -Server:$RoleFqdnOrName -DomainController $RoleDomainController);

if($dbs.Length -ne 0)

{

$mbxUser = @(get-user -Filter {name -eq $name} -IgnoreDefaultScope -ResultSize 1);

if ($mbxUser.Length -ne 0)

{

enable-mailbox -Discovery -identity $mbxUser[0] -DisplayName $dispname -database $dbs[0].Identity;

}

}

}

}

else

{

write-exchangesetuplog -info “Skipping creating Discovery Search Mailbox because of insufficient permission.”

}

}

” was run: “Microsoft.Exchange.Data.DataValidationException: Database is mandatory on UserMailbox.”.

 

Error:

The following error was generated when “$error.Clear();

if (($RoleIsDatacenter -ne $true) -and ($RoleIsDatacenterDedicated -ne $true))

{

if (test-ExchangeServersWriteAccess -DomainController $RoleDomainController -ErrorAction SilentlyContinue)

{

# upgrade the discovery mailboxes to R5 version, this will fix the RecipientDisplayType property of the discovery mailbox which was wrong in R4.

get-mailbox -RecipientTypeDetails DiscoveryMailbox -DomainController $RoleDomainController | where {$_.IsValid -eq $false} | set-mailbox -DomainController $RoleDomainController

$name = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxUniqueName;

$dispname = [Microsoft.Exchange.Management.RecipientTasks.EnableMailbox]::DiscoveryMailboxDisplayName;

$mbxs = @( get-mailbox -Filter {name -eq $name} -IgnoreDefaultScope -resultSize 1 );

if ( $mbxs.length -eq 0)

{

$dbs = @(get-MailboxDatabase -Server:$RoleFqdnOrName -DomainController $RoleDomainController);

if($dbs.Length -ne 0)

{

$mbxUser = @(get-user -Filter {name -eq $name} -IgnoreDefaultScope -ResultSize 1);

if ($mbxUser.Length -ne 0)

{

enable-mailbox -Discovery -identity $mbxUser[0] -DisplayName $dispname -database $dbs[0].Identity;

}

}

}

}

else

{

write-exchangesetuplog -info “Skipping creating Discovery Search Mailbox because of insufficient permission.”

}

}

” was run: “Microsoft.Exchange.Data.DataValidationException: Database is mandatory on UserMailbox.

at Microsoft.Exchange.Configuration.Tasks.Task.ThrowError(Exception exception, ErrorCategory errorCategory, Object target, String helpUrl)

at Microsoft.Exchange.Configuration.Tasks.Task.WriteError(Exception exception, ErrorCategory category, Object target, Boolean reThrow)

at Microsoft.Exchange.Configuration.Tasks.DataAccessTask`1.Validate(TDataObject dataObject)

at Microsoft.Exchange.Configuration.Tasks.SetTaskBase`1.InternalValidate()

at Microsoft.Exchange.Configuration.Tasks.SetRecipientObjectTask`3.InternalValidate()

at Microsoft.Exchange.Management.Common.SetMailEnabledRecipientObjectTask`3.InternalValidate()

at Microsoft.Exchange.Management.RecipientTasks.SetUserBase`2.InternalValidate()

at Microsoft.Exchange.Management.RecipientTasks.SetMailboxBase`2.InternalValidate()

at Microsoft.Exchange.Management.RecipientTasks.SetMailbox.InternalValidate()

at Microsoft.Exchange.Configuration.Tasks.Task.<ProcessRecord>b__b()

at Microsoft.Exchange.Configuration.Tasks.Task.InvokeRetryableFunc(String funcName, Action func, Boolean terminatePipelineIfFailed)”.

Solution:

The issue relates with the missing homeMDB attribute for the default Exchange Discover Search Mailbox.

Copy the homeMDB object attribute from one of the healthy mailbox and paste in the homeMDB object attribute of the default Exchange Discovery Search Mailbox. This can be done from Active Directory Users and Computers.

Once the above object property changes are done, re-run the setup and it will install successfully.

Comments (2)

  1. Waseem

    Great 👍

    March 7, 2021 at 4:55 pm
    |Reply
  2. บาคาร่า

    Ahaa, its good discussion concerning this article here
    at this weblog, I have read all that, so at this time me
    also commenting here.

    March 28, 2021 at 10:17 pm
    |Reply

Leave your thought here

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Topics