Bobcares

How to manage disconnected mailboxes in Exchange Server

by | Nov 4, 2020

Mailboxes of the disconnected users are not immediately deleted in an Exchange server.

As a part of our Server Management Services, we help our Customers to fix Exchange related errors regularly.

Let us today discuss the steps to manage disconnected mailboxes in Exchange Server.

What happens to disconnected mailboxes in an Exchange server?

After deleting an Exchange mailbox or an Active Directory user account, it stores the mailbox in the mailbox database for some time. By default, the exchange server keeps it for 30 days.

The administrator can recover data from this mailbox or reassign it to another user.

An Exchange mailbox consists of two parts:

  • An Active Directory user account (It stores all configuration data of a mailbox in its attributes)
  • The mailbox in the Exchange mailbox database.

A deleted Exchange mailbox will be available in the database, but will not be connected to any of the AD accounts.

There are two types of deleted Exchange mailboxes:

  1. Disabled – these are mailboxes disabled using Disable-Mailbox or Remove-Mailbox cmdlets
  2. Soft Deleted – the copies of the mailboxes saved in storage after moving mailbox to another mailbox database.

Common operations with deleted mailboxes

To display the list of all available deleted mailboxes in all Exchange databases, run this command:

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq "Disabled" } | ft DisplayName,Database,DisconnectDate,MailboxGUID

Now, to find the deleted mailboxes in one database:

Get-MailboxStatistics –database Lon-DB1 | Where { $_.DisconnectReason -eq "Disabled" } | ft DisplayName,Database,DisconnectDate,MailboxGUID

We can obtain the list of deleted mailboxes having SoftDeleted status using the following command:

Get-MailboxDatabase | Get-MailboxStatistics | Where { $_.DisconnectReason -eq "SoftDeleted" } | ft DisplayName,Database,DisconnectDate,MailboxGUID

 

How to Clear Exchange Databases from the Deleted Mailboxes

Exchange automatically clears the deleted mailboxes from the database after the specified time.

But the disabled mailboxes still take some space in a database. Thus during mass user migrations/removals, it may be necessary to force remove these mailboxes to free some space in the mail databases.

To permanently delete a disabled mailbox from the database, use Remove-StoreMailbox cmdlet having specified the MailboxGUID of the deleted mailbox.

Remove-StoreMailbox -Database Lon-DB1 -Identity "2532944e-8eeb-4c7e-8bd3-ee2a223b071e" -MailboxState Disabled

To delete all disabled mailboxes in the Exchange organization:

Get-MailboxDatabase | Get-MailboxStatistics | where {$_.DisconnectReason -eq "Disabled"} | foreach {Remove-StoreMailbox -Database $_.database -Identity $_.mailboxguid -MailboxState SoftDeleted}

If we have to delete mailbox copies left after the migration in a specific database, run the following command:

Get-MailboxStatistics –Database Lon-DB1 | Where-Object {$_.DisconnectReason –eq “Softdeleted”} | ForEach {Remove-StoreMailbox –Database $_.database –identity $_.mailboxguid –MailboxState Softdeleted –Whatif

Connecting a Deleted Mailbox to a User

We can connect a deleted mailbox to the same or another Active Directory account. To connect a mailbox to the same account, run this command:

Connect-Mailbox -Identity "JSmith" -Database Lon-DB1 -User JSmith

We can perform the same operation from the EAC interface via Exchange Admin Center -> Recipients -> Connect a Mailbox.

Do not forget to check and correct SMTP aliases if necessary. Before we start using the mailbox, wait till Active Directory replication is over.

How to Restore a Deleted Mailbox to a Mailbox of Another User

We can restore the data from a deleted mailbox to an existing mailbox of another user.

New-MailboxRestoreRequest -SourceDatabase Lon-DB1 -SourceStoreMailbox "JSmith" -TargetMailbox "Admin"

Similarly, we can restore the mailbox by its MailboxGuid, say, to a separate folder RestoreBox:

New-MailboxRestoreRequest -SourceDatabase Lon-DB1 -SourceStoreMailbox “2532944e-8eeb-4c7e-8bd3-ee2a223b071e” -TargetMailbox “Admin” –TargetRootFolder “RestoreBox” –AllowLegacyDNMismatch

[Need any further assistance to manage disconnected mailboxes in Exchange Server? – We’re available 24*7]

 

Conclusion

In short, after deleting an Exchange mailbox or an Active Directory user account, it stores the mailbox in the mailbox database for some time. Today, we saw how our Support Engineers manage disconnected mailboxes in Exchange Server.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

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

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF