IT tutorials
 
Technology
 

Microsoft Exchange Server 2013 : Mailbox management - Reconnecting mailboxes

6/20/2014 4:00:35 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

When Exchange disconnects a mailbox after running either the Disable-Mailbox or Remove-Mailbox cmdlet, it stamps the current date and time in the mailbox’s DisconnectDate property. This marks the start of the clock that ticks down until the retention time expires. The retention time for deleted mailboxes is a property of a mailbox database and can differ from the default 30 days. For example, for legal reasons, you might want to remove or retain mailboxes for some classes of employees for different periods. This is easily achieved by placing the employee mailboxes in databases that are configured with different retention periods. You can use this command to see the current deleted mailbox retention period for all the databases in the organization:

Get-MailboxDatabase | Select Name, MailboxRetention

Setting a different retention period is a matter of using Set-MailboxDatabase to set the desired value. For example, to set a mailbox retention period of 60 days for the VIP Data database, you would use this command:

Set-MailboxDatabase –Identity 'VIP Data' –MailboxRetention 60

EAC includes the Connect Mailbox option (in the list revealed by the ellipsis) to view disconnected mailboxes and then connect a selected mailbox back to an Active Directory account (Figure 1). This option works by scanning all the mailbox databases on a selected server to detect disconnected mailboxes. The administrator can then select a mailbox and click the Connect icon (above Display Name in the figure) to force EAC to search for a suitable Active Directory account to which it can connect the mailbox. If EAC can find a suitable match in Active Directory, it reconnects the mailbox. If not, EAC displays a dialog box to enable the administrator to select the correct Active Directory account to which the mailbox should be reconnected. It is possible that no suitable Active Directory accounts can be found, as when all available accounts are already connected to a mailbox. If this happens, you can create a new Active Directory account and then rerun the option. EAC detects the new account and enables you to reconnect the mailbox to it.

A screen shot showing a list of disconnected mailboxes as detected by EAC. These mailboxes can be reconnected to an Active Directory account.

Figure 1. Viewing disconnected mailboxes

It’s more fun to do the work through EMS because you learn more about Exchange by exploring the different steps that are involved in the process. First, you have to execute a command like this to retrieve information from a database about the mailboxes that are in this state:

Get-MailboxStatistics –Database DB2 –Filter {DisconnectDate –ne $Null}
 | Format-List DisplayName, DisconnectDate, DisconnectReason

If you want, you can execute much the same command to discover details about all disconnected mailboxes on a server:

Get-MailboxStatistics –Server ExServer2 –Filter {DisconnectDate –ne $Null}
 | Format-List DisplayName, DisconnectDate, DisconnectReason, Database

You see values such as SoftDeleted and Disabled reported as the reason a mailbox was disconnected. Mailboxes shown as SoftDeleted are those that have been moved to another database. They are retained in the original database just in case the mailbox move is affected by a problem that leaves the new mailbox in an inconsistent or corrupted state for some reason. Keeping the original mailbox following a move enables an administrator to reconnect the user to this copy if the need arises.

Mailboxes that are reported as Disabled are those that have been disabled through EAC or by running the Disable-Mailbox command in EMS. Sometimes it can take a little while after a mailbox is disabled or removed before it shows up on the list of disconnected mailboxes. This could occur because Active Directory hasn’t replicated the disconnected status for the mailbox to the domain controller EMS is using. It might also be that the Store has not yet stamped a disconnected date on the mailbox, so the filter EMS uses to find disconnected mailboxes doesn’t pick it up.

After you have identified a disconnected mailbox that needs to be reconnected, you can use the Connect-Mailbox cmdlet to do the job. The easiest situation is when Exchange can match the disconnected mailbox to an Active Directory user account by reference to the name of the Active Directory account by using the values contained in the DisplayName and LegacyExchangeDN properties of the disconnected mailbox. For example, if you have an account called John Smith and a disconnected mailbox whose display name is also John Smith, it’s likely that the two are a match; it’s therefore acceptable to let Exchange join the two:

Connect-Mailbox –Database VIP –Identity "John Smith"

Life isn’t normally so straightforward. At least, not all the time. Different naming schemes for Active Directory user accounts and Exchange mailboxes can conspire to stop any attempt to match one with the other. EMS flags an error if it can’t run Connect-Mailbox as previously shown and find a matching Active Directory account. In this case, you can always use the globally unique identifier (GUID) to identify the mailbox in the database and direct Exchange to the precise Active Directory account to which you want to connect the mailbox.

First, retrieve the GUID:

$Guid= (Get-MailboxStatistics –Database DB2 –Filter {DisconnectedDate –ne $null –and DisplayName
 –eq 'John Smith'}.MailboxGuid

This returns a value such as ‘50e2778f-e8ae-40d7-9dd8-bb22a101e8e5’. You can now use that value to reconnect the mailbox:

Connect-Mailbox -Identity '50e2778f-e8ae-40d7-9dd8-bb22a101e8e5' -Database 'DB2' 
-User 'contoso.com/Exchange Users/John Smith' -Alias 'JSmith'

The mailbox GUID is the most precise method of identifying an Exchange object in situations like this. It also is useful if you want to delete a mailbox from a database before its retention period expires. This code scans a database for a particular mailbox, saves its GUID in a variable, and then removes the contents by using the Remove-Mailbox cmdlet. Note the use of the StoreMailboxIdentity parameter in this command.

$Mbx = Get-MailboxStatistics –Database 'DB1' | Where {$_.DisplayName –eq 'Redmond, Tony'}
Remove-Mailbox –Database 'DB1' –StoreMailboxIdentity $mbx.MailboxGuid

When you delete mailbox contents in this way, you will have to use a backup to retrieve them if necessary afterward.

Inside Out Avoiding errors

You might be concerned about the potential for error that can occur if an administrator uses Remove-Mailbox instead of disabling a mailbox and discovers that he’s just deleted the user’s Active Directory account. To avoid problems and to make sure that mailboxes are kept as long as they are required, many companies have adopted a simple process by which they do the following:

  1. Disable the Windows account to prevent any further access to the account.

  2. Hide the mailbox from the GAL.

  3. Change the SMTP email address to make it invalid and stop new messages from arriving in the mailbox.

  4. Set up a suitable auto-reply message for the mailbox so that anyone who sends to the new SMTP address is told that her message won’t be read.

  5. Keep the mailbox online and accessible for up to 90 days.

Between 45 and 60 days is usually sufficient to establish whether the mailbox contents are ever required. When the mailbox is no longer required, you can safely eliminate both the account and mailbox.

 
Others
 
- Microsoft Exchange Server 2013 : Mailbox management - Removing or disabling mailboxes
- Microsoft Exchange Server 2013 : Mailbox management - Setting mailbox quotas
- Microsoft Exchange Server 2013 : Mailbox management - Mailbox resources provisioning management agent
- Windows 8 : Configuring Internet Explorer 10 (part 4) - Managing Internet Explorer settings by using Group Policy
- Windows 8 : Configuring Internet Explorer 10 (part 3) - Controlling Internet Explorer Start screen tile behavior, Configuring Internet Explorer 10
- Windows 8 : Configuring Internet Explorer 10 (part 2) - Configuring the startup Internet Explorer
- Windows 8 : Configuring Internet Explorer 10 (part 1) - Managing two Internet Explorer experiences
- Windows Server 2012 : Administering Active Directory objects using ADAC (part 4) - Common administration tasks - Creating users
- Windows Server 2012 : Administering Active Directory objects using ADAC (part 3) - Common administration tasks - Creating organizational units
- Windows Server 2012 : Administering Active Directory objects using ADAC (part 2) - Searching Active Directory
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us