This blog will give the solution and fix for Active Directory and Messaging administrators

  • A directory is a hierarchical structure that stores information about objects on the network. Active Directory Domain Services (AD DS), stores information about objects on the network like user accounts, such as names, passwords, phone numbers, and so on, and enables other authorized users on the same network to access this information. Active Directory uses a structured data store as the basis for a logical, hierarchical organization of directory information.

  • Microsoft 365 is a cloud-based services designed to help meet your organization's needs for robust security, reliability, and user productivity.

  • Microsoft Learning

    Learn technical skills with Microsoft role based certifications, find the right training and certification opportunities to aid in your career growth and success.

  • Microsoft Exchange Online is a hosted messaging solution that delivers the capabilities of Microsoft Exchange Server as a cloud-based service. It gives users access to email, calendar, contacts, and tasks from PCs, the web, and mobile devices. It integrates fully with Active Directory, enabling administrators to use group policies, as well as other administration tools, to manage Exchange Online features across their environment

  • Powershell

    A comprehensive command line interface and scripting language for Windows. Introduced in 2006, PowerShell is a major upgrade from the Windows command line, which uses DOS commands. PowerShell supports common programming structures such as "if-then-else" and "while," it is generally less complicated than Microsoft's VBScript and JScript languages.

Showing posts with label Powershell. Show all posts
Showing posts with label Powershell. Show all posts

WARNING: An unexpected error has occurred and a Watson dump is being generated: Connect-Mailbox

Day to day we have to face some challenges in exchange and learn new things about it. Let us learn about how to connect disconnected mailbox and error message and how to fix it.
we can use the exchange admin center (EAC) or the Shell to connect a disabled mailbox to an user account. Exchange retains the disabled mailbox in the mailbox database disabled state. 

But, Exchange attributes were removed from the corresponding user account, but the user accounts still retained available until we delete it. Also, the mailbox is retained until the deleted mailbox retention period expires, which is 30 days by default, and then it's permanently deleted (or purged) from the mailbox database and mailbox cannot be connected. 

"To check the retention period you can use Get-MailboxDatabase | FL *retention*"

we can connect and use or export the the disabled mailbox data until permanently deleted from the Exchange mailbox database, it can be done EAC or the powershell to reconnect it to the original or another Active Directory user account.

Connect the Mailbox via Powershell:

Connect-Mailbox -Identity "DisplayName or GUID" -Database "DatabaseName" -User "TargetUser" 

Connect the Mailbox via Exchange Admin Center (EAC):
  1. Open Exchange Admin Center (EAC) --> Recipients --> Mailboxes.
  2. Click More More Options (...), then click Connect a mailbox.
  3. A list of mailboxes will be displayed, like... disconnected mailboxes includes disabled mailboxes, deleted mailboxes, and soft-deleted mailboxes.
  4. Click the disabled mailbox that you want to reconnect, and then click Connect.
While doing this we will get some error like below, it happens because of LegacyDN, 
The error message you can get it from EAC...

The LegacyDN "LegaacyDN value" is in use by the following user in Active Directory: "username". The value for LegacyDN must be unique to each user.

Error message in Powershell:

[PS] C:\Windows\system32>Connect-Mailbox  -Identity <Mailbox ID> -User <UserMailbox> -Archive -Database  <Database name>

WARNING: An unexpected error has occurred and a Watson dump is being generated: Object reference not set to an instance of an object.
Object reference not set to an instance of an object.
    + CategoryInfo          : NotSpecified: (:) [Connect-Mailbox], NullReferenceException
    + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.Exchange.Management.MapiTasks.ConnectMailbox
    + PSComputerName        : Server name


To fix this, we can use -AllowLegacyDNMismatch switch allow to connect the mailbox

Connect-Mailbox -Identity "DisplayName or GUID" -Database "DatabaseName" -User "TargetUser"  -AllowLegacyDNMismatch



Share:

Search This Blog

Categories

Recent Posts