Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Assume that you run the New-MailboxRestoreRequest and New-MailboxExportRequest cmdlets in Microsoft Exchange Server 2016 PowerShell. When the TargetMailbox parameter includes a white-space, you may receive a "NullReferenceException" error message. For example:

[PS] C:\Windows\system32>New-MailboxRestoreRequest -SourceDatabase " <DatabaseIdParameter>" -SourceStoreMailbox " <StoreMailboxIdParameter> " -TargetMailbox "MS Test" -AllowLegacyDNMismatch
WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
WARNING: Task module "LoggingModule.OnIterateCompleted" fails with exception "Object reference not set to an instance of an object.".
This module is skipped. Task execution result should not be affected.
Object reference not set to an instance of an object.
   + CategoryInfo          : NotSpecified: (:) [New-MailboxRestoreRequest], NullReferenceException
   + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Management.Migration.MailboxReplication
  .MailboxRestoreRequest.NewMailboxRestoreRequest
   + PSComputerName        : <ComputerName>

In addition, an Event ID 4999 with a "NullReferenceException" error will be logged in the Event Viewer. It's expected that the cmdlets can run successfully regardless of the white-space included in the TargetMailbox parameter.

Cause

This issue occurs because one parameter is returning a wrong value when the TargetMailbox parameter has a white-space in it.

Resolution

To resolve this issue, install Cumulative Update 11 for Exchange Server 2016 or a later cumulative update for Exchange Server 2016.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

References

Learn about the terminology that Microsoft uses to describe software updates.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×