Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

Event ID 4999 and NullReferenceException when the New-MailboxRestoreRequest and New-MailboxExportRequest cmdlets fail in Exchange Server 2016


View products that this article applies to.

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.

↑ Back to the top


Cause

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

↑ Back to the top


Resolution

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

↑ Back to the top


Status

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

↑ Back to the top


References

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

↑ Back to the top


Keywords: kbContentAuto, CI87427, kb, kbqfe, kbsurveynew, kbexpertiseadvanced, Event ID 4999 and NullReferenceException, the New-MailboxRestoreRequest and New-MailboxExportRequest cmdlets fail, the TargetMailbox parameter includes a white-space, kbfix

↑ Back to the top

Article Info
Article ID : 4456245
Revision : 10
Created on : 7/30/2020
Published on : 7/30/2020
Exists online : False
Views : 413