Wednesday, 10 October 2012

Managing mailboxes in Exchange Server 2007 (Part 2)

Introduction

Now that we have seen the first part of managing mailboxes in Exchange Server 2007, we can analyze this subject at a deeper level. In this article, we are going to see how to get some mailbox information, the exclusion and reconnection process, and also advanced features at the mailbox level.

Getting information from mailboxes

After we have created some mailboxes, it would be interesting to get some information about them using the Exchange Management Shell. To accomplish this, we can use two cmdlets:
  • get-mailboxStatistics
  • get-mailboxFolderStatistics.
Using the Get-MailboxStatistics cmdlet, (as shown on Figure 01) we can extract several pieces of information from a mailbox, such as quantity and number of items, quantity and number of deleted items, time of the last logon and logoff. To get this information, you can use this syntax:
Get-MailboxStatistics <user> | fl
The fl is an alias of the format-list cmdlet which formats the output as a list of properties in which each property appears on a new line.

Figure 01: Getting information from the Anderson.Patricio mailbox
Sometimes we need more information than Get-MailboxStatistics, in this case we can use Get-MailboxFolderStatistics to obtain more information such as the number of items and the size of each folder for the specified mailbox (Figure 02).
The cmdlet and syntax is shown below:
Get-MailboxFolderStatistics <user>

Figure 02: Getting information folder by folder from user Anderson.Patricio

Defining features to a specific mailbox

Another important feature is being able to configure some Outlook Web Access features. To configure at virtual directory level, we can follow these steps:
  1. Open Exchange Management Console
  2. Expand Server Configuration
  3. Click on Client Access
  4. In the Work Panel select your server
  5. In the Result Panel click on OWA
  6. Click on Properties in the Actions pane (Figure 03)

Figure 03: Properties of OWA virtual Directory
  1. Go to the Segmentation tab (Figure 04) and you can enable or disable some features for OWA using virtual directory for all users.

Figure 04: Managing features for OWA at virtual directory level
But sometimes we need more flexibility, for example when a specific user cannot change his password or another specific situation, so for this kind of situation we can manage these features through the Set-CASMailbox cmdlet.
Here are the main features that we can change at user level using the Set-CASMailbox cmdlet:
  • MAPIBlockOutlookNonCachedMode
  • MAPIBlockOutlookRpcHttp
  • MAPIBlockOutlookVersions
  • MAPIEnabled
  • OWAActiveSyncIntegrationEnabled
  • OWAAllAddressListsEnabled
  • OWACalendarEnabled
  • OWAChangePasswordEnabled
  • OWAContactsEnabled
  • OWAEnabled
  • OWAJournalEnabled
  • OWAJournalEnabled
  • OWAJunkEmailEnabled
  • OWANotesEnabled
  • OWAPremiumClientEnabled
  • OWARemindersAndNotificationsEnabled
  • OWASearchFoldersEnabled
  • OWASignaturesEnabled
  • OWASpellCheckerEnabled
  • OWATasksEnabled
  • OWAThemeSelectionEnabled
  • OWAUMIntegrationEnabled
  • OWAUNCAccessOnPrivateComputersEnabled
  • OWAUNCAccessOnPublicComputersEnabled
  • OWAWSSAccessOnPrivateComputersEnabled
  • OWAWSSAccessOnPublicComputersEnabled
By default, all of these attributes are empty, and the user uses the OWA virtual directory settings. When we enable any attributes, the other attributes will automatically be $false, so we will have to enable the attribute that we really want for the user.
Here are some examples of what we can do with the Set-CASMailbox cmdlet:
  1. Disabling E-mail signature in OWA

    Set-CASMailbox <user> -OWASignaturesEnabled:$false
  2. Setting a user to use only OWA Light version

    Set-CASMailbox <user> -OWAPremiumClientEnabled:$false
  3. Disabling change of password

    Set-CASMailbox <user> -OWAChangePasswordEnabled:$false

Disabling Mailboxes

When we disable a mailbox in Exchange Server 2007 we are removing the exchange attributes of this mailbox, but the user remains in Active Directory. To disable a mailbox you should:
  1. Open Exchange Management Console
  2. Expand Recipient Configuration
  3. Click on Mailbox
  4. Choose a mailbox and click on Disable in the Actions pane (Figure 05)

Figure 05: Disabling a mailbox through Exchange Management Shell
  1. On the Microsoft Exchange page, a new message dialog box will appear asking if we really want to disable that user, click on Yes to continue (Figure 06).

Figure 06: Dialog box confirming the disabling of a mailbox
Of course, we can also remove the mailbox using the Exchange Management Shell with the remove-mailbox cmdlet. We will then be prompted whether we want to disable it, to confirm this operation we can press Y and Enter. (Figure 07).

Figure 07: Disabling a user by Exchange Management Shell

Removing mailboxes

We can also remove a mailbox, but be aware that removing a mailbox will also delete the object in Active Directory.
  1. Open Exchange Management Console
  2. Expand Recipient Configuration
  3. Click on Mailbox
  4. Choose a mailbox and click on Remove in the Actions pane (Figure 08)

Figure 08: Removing a mailbox in the Exchange Management Console
  1. On the Microsoft Exchange page, click Yes to confirm the deletion of the Windows User object and the mailbox. (Figure 9)

Figure 09: Confirming the mailbox removal
Another way of doing this is using the Exchange Management Shell, using the remove-mailbox cmdlet (Figure 10):
Remove-Mailbox <User>

Figure 10: Removing a mailbox in the Exchange Management Shell

Reconnecting Mailboxes

Now we have completed the process of creating and removing/disabling a mailbox, we will see how to reconnect a removed or disabled mailbox. By default all the removed/disabled mailboxes stay in the mailbox store for 30 (thirty) days. This value can be set at mailbox store level. To change this retention value we should:
  1. Open Exchange Management Console
  2. Expand Server Configuration
  3. Click on Mailbox
  4. Select your server in the Mailbox Pane
  5. Click on Mailbox Store in the Result Pane
  6. Click on Properties in the Actions pane (Figure 11)

Figure 11: The mailbox store and clicking on Properties
  1. Go to the Limits tab
  2. In the Deletion Settings section we can choose the number of days that a disconnected mailbox stays in the Mailbox Database (Figure 12)

Figure 12: Defining the number of days that a disconnected mailbox stays in mailbox store
Now we know how much time a disconnected mailbox stays in the mailbox store, we will check the disconnected mailboxes out and connect them, as shown below:
  1. First of all, we are going to create a user in Active Directory Users and Computers called user.recovery
  2. Open Exchange Management Console
  3. Expand Recipient Configuration
  4. Click on Disconnected Mailbox
  5. We will see all the disconnected mailboxes in the work panel. Select the disconnected user, and click on Reconnect in the Actions pane (Figure 13)

Figure 13: Reconnecting a mailbox
  1. Introduction. On the Introduction page, select User Mailbox and then click Next to continue (Figure 14).

Figure 14: Choosing mailbox type to reconnect
  1. Mailbox Settings. We have created a new mailbox called user.recovery. We can click on Existing user and click on user.recovery which will connect to the contents of the old removed or disabled mailbox. (Figure 15). On the Mailbox Settings page, we have two possible options:

    Matching user: To locate a user account that matches the mailbox object, Exchange will use the LegacyExchangeDN and DisplayName attributes of the Exchange store mailbox object. If Exchange doesn’t find anything we will have to choose an existing user.

    Existing User: If we want to connect the mailbox to a user other than the matching user. Click Browse to see a list of users available in Active Directory. The list will contain only users that do not have an associated mailbox.

    For the purposes of this article, click on Existing User and choose user.recovery on the Browse button, and then click Next to continue. (Figure 15)

Figure 15: Connecting an existing user to an old mailbox
  1. Connect mailbox. We can see the summary of the configuration that will be completed in the next step. Click Connect to continue. (Figure 16)

Figure 16: The Configuration Summary in the Connect Mailbox wizard
  1. Completion. On the Connect Mailbox page, the final screen of connect mailbox wizard, if everything has run without errors, the page will appear as Completed. (Figure 17)

Figure 17: Final screen showing us that cmdlet connect-mailbox was completed successfully
  1. Now the user user.recovery can log on to his/her mailbox and check for all the content that belonged to its removed or disabled user object.

Changing the Rule limit in a mailbox

This is a point that could not be left aside in this article; a new feature that comes with Exchange Server 2007 is the possibility of changing the size of rule quotas. By default, the value is 64KB but we can upgrade it to 256KB per user.
Another interesting point is that this value is applicable only to valid rules; all of the rules that are disabled do not count in the RulesQuota value.
To change the RulesQuota value in Exchange Server 2007, we can use this cmdlet in the Exchange Management Shell:
Set-Mailbox <user> -RulesQuota:256KB

Goto: Managing mailboxes in Exchange Server 2007 (Part 1)