Wednesday, February 9, 2011

Exchange Server 2007 Email Routing

Exchange Server 2007contains a completely new implementation of email routing. Each of the Active Directory service sites where Exchange mailboxes are hosted must have a Hub Transport server role to control messaging between sites, even within a single site. Within this article we will dive a little bit deeper into this new technology and I will explain how it works. Part I explains the vocabulary and the architecture to help you understand how Exchange is designed and how it works, Part II will show how to configure it on Exchange Server 2007 using the GUI administration tools and Powershell.

Message Flow Architecture

The Hub Transport server role is essential for each Exchange Server 2007 to route internal and external emails. The service running on these servers is the Exchange Transport Service (MSExchangeTransport.exe).
Inbound Email
Inbound email is email that is delivered from outside Exchange Server 2007, for example, from the Internet. We should have a gateway server implemented which can be an Edge Transport server role or Hub Transport server role. This depends on what internet connectivity and firewall structure is implemented. Best practice should be installing an Exchange Server 2007 Edge Transport server role residing in the perimeter network (also known as DMZ) without the need of Active Directory. This server then routes incoming messages into your Exchange Server 2007 organization.
Outbound Email
Outbound email means messages that are being sent from internal mailbox users to external recipients residing on the Internet. After a Hub Transport server has processed the mail and identified it as outbound mail, the server routes it to the Internet, either directly or again by passing a gateway server. This gateway server can be an Edge Server Transport server.
Local Email
Local mail flow refers to messages that are processed by a Hub Transport server in an Exchange Server 2007 organization and delivered to a mailbox on the same Active Directory Site.
Remote Email
Remote Email flow refers to messages that are processed by a Hub Transport server in an Exchange Server 2007 organization and delivered to a mailbox on a different Active Directory site from the source mailbox.

SMTP Connectors

SMTP connectors are Exchange Server 2007 components that support one-way SMTP connections. Due to this new restriction (based on earlier versions of Exchange Server) we need two connectors:
  • SMTP Receive Connectors
  • SMTP Send Connectors
An SMTP Receive connector is required for an Exchange Server 2007 server system to accept any SMTP connection. It is used to enable an Exchange Server Hub Transport role or Edge Transport server role to receive email from any other SMTP server on the Internet, other Exchange Server 2007 Hub Transport server roles, Edge Transport server roles or other Exchange Server 2007 environments. You can configure multiple SMTP Receive connectors with different parameters on a single Exchange Server due to implementation or high availability reasons. You do not have to create SMTP Receive connectors to route mail between Hub Transport server roles within the same forest.
An SMTP Send connector is required for an Exchange Server 2007 system to send any SMTP email. It is required to send email to any SMTP server on the internet or to any SMTP server within the same Exchange Server organization.
You can manage each of them using the Exchange Management Console or Exchange Management Shell. To manage connectors using the shell use the Set-ReceiveConnector and Set-SendConnector cmdlets.

Message Transport Components

To work with Exchange Server and troubleshoot message transport problems you should know the internal workings of Exchange message routing.
Messaging Components are:
  • Submission Queue
  • Store Driver
  • Microsoft Exchange Mail Submission Service
  • Pickup Directory
  • Categorizer
Messages from outside your Exchange organization enter the transport pipeline through an SMTP Receive Connector. Messages inside enter the pipeline through the Hub Transport server role.

Submission Queue

Each Transport server role (Hub or Edge Transport) has one submission queue that is created by the categorizer when Exchange Transport Service starts. It stores all messages on the local hard disk until they are processed by the categorizer for delivery. They are then finally removed from this queue.

Store Driver

Messages sent by a mailbox user enter the transport pipeline when they reach the sender’s outbox. The store driver on the Hub Transport retrieves it from the user’s Outbox and then transfers it to the submission queue. After the message has been successfully added to the submission queue, it is moved from the sender’s Outbox to the sender’s Sent Items. Messages are stored in MAPI format and must be converted to Summary Transport Neutral Encapsulation Format (S/TNEF) before being placed in the Submission Queue. This conversion is the job of the store driver, too. If this conversion is unsuccessful, a non-delivery report (NDR) is generated.

Microsoft Exchange Mail Submission Service

The Microsoft Exchange Mail Submission Service is a notification service that runs on Mailbox server roles. It notifies the Hub Transport server role to pick up the message from the sender’s Outbox. If there are multiple Hub Transport server roles on one Active Directory site, the Message Exchange Mail Submission service attempts to evenly distribute notifications between each transport role using static load balancing.

Pickup Directory

Each message that is transferred to the pickup directory has been successfully submitted to the submission queue via the categorizer. Messages placed in the Pickup Directory must be in the appropriate format and have read/write permissions configured. It allows you to take a properly formatted text file and have the Hub Transport server role process and deliver it. This can be very helpful when mail flow is being validated in the organization or relaying specific messages or returning to the transport pipeline. Even 3rd party applications may place messages in the Pickup directory rather than communicating directly with the Exchange Server.

Categorizer

The categorizer always picks the oldest message from the Submission queue and checks whether this message has to be routed internally in the Exchange organization or externally.
On each Hub Transport server the categorizer performs the following tasks:
  • Identification and verification of recipients
  • Expansion of distribution lists
  • Determination of routing paths
  • Conversion of content formats
  • Application of message policies

Implementation of Message Transports

Every time you install Hub Transport server roles in Exchange Server 2007 environments, message routing is enabled by default, but you may need to configure additional options on the Hub Transport server role. This process can look like this:
  • Configure server-specific settings
  • Configure authoritative domains and email address policies
  • Configure a postmaster mailbox
  • Configure Internet message flow
  • Configure messaging policies
  • Configure administrative permissions:
    • Exchange Organization Administrators
    • Exchange Server Administrators
    • Exchange View-Only Administrators
Each of these configuration settings are unique and need to be defined in a design document before the configuration for each company.

Sunday, February 6, 2011

Managing Exchange 2010 with Remote PowerShell


by Mukesh Kumar Singh on February 6, 2011
One of the major changes in Exchange 2010 is that all of the Exchange Management Shell administration is done through PowerShell remoting. Even when you run the Exchange Management Shell from an Exchange Server, or a workstation with the Exchange tools installed, you are establishing a remote PowerShell session to Exchange.
When you double click the Exchange Management Shell icon on an Exchange 2010 server or workstation with the management tools installed, the following takes place:
  • The Microsoft.Exchange.Management.PowerShell.E2010 snap-in gets loaded.
  • The RemoteExchange.ps1 script get's dot sourced into the PowerShell session - this initializes some variables and imports several Exchange specific functions.
  • The Connect-ExchangeServer function gets executed - this will attempt to create a remote PowerShell session on the local server, if a connection cannot be made locally it will attempt to connect to a another server in the same site, starting with servers running the CAS role, then on to servers running the mailbox, hub transport and UM roles.
  • Once you are connected to an Exchange server, all of the Exchange cmdlets are imported into the PowerShell session using implicit remoting.
You can run the Connect-ExchangeServer function manually. Use the -auto parameter to connect using autodiscover:
Connect-ExchangeServer -auto

You can use the Connect-ExchangeServer function with the -ServerFQDN parameter to manually connect to a specific server:
Connect-ExchangeServer -ServerFqdn phx-ex01.exchangelab.com

Manually Configuring Implicit Remoting

We can manually configure implicit remoting to import commands into our local PowerShell session. This means that we do not need to have the Exchange tools installed in order to work with Exchange Management Shell commands.
The first step is to create a session using the New-PSSession cmdlet:
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://phx-ex01.exchangelab.com/PowerShell/ -Authentication Kerberos

If you need to connect with alternate credentials, you can use the credential parameter with New-PSSession. For example, you can pass the Get-Credential cmdlet to the credential parameter, this would prompt you for your credentials when creating your PSSession.
$s = New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri http://phx-ex01.exchangelab.com/PowerShell/ -Authentication Kerberos -Credential (Get-Credential)
Once you have a PSSession object created, import the session using the Import-PSSession cmdlet:
Import-PSSession $s

As you can see here, the Exchange Management Shell commands are imported into our local PowerShell session and listed in under the exported commands column.

Managing Exchange Servers using Fan-Out Remoting

Fan-out remoting is used to issue PowerShell commands to many systems at once. For example, say you need to reboot several servers for maintenance, you could use the Invoke-Command cmdlet to invoke the Restart-Computer cmdlet on each server at the same time:
$srv = "EX01","EX02","EX03"
Invoke-Command -ScriptBlock {Restart-Computer -Force} -ComputerName $srv

Fan-out remoting is useful for mass server management, when the Exchange cmdlets are not required. For example, restarting services or making a registry change on many servers at once, or rebooting multiple servers at the same time as we saw in this example.

Adding Exchange Management Shell to your Standard PowerShell Profile

I like to have all my tools loaded in my standard PowerShell profile. For example, I have several snap-ins and other tools loading when I start PowerShell. I use a single PowerShell instance to manage AD with the RSAT AD PowerShell module, PowerCLI for VMware, and also the Exchange Management Shell tools.
If you do not have a profile setup, you can create one using the following command:
New-Item -Itemtype file -path $profile -force

Once your profile is created, you can edit it in notepad by typing notepad $profile and hitting enter.
There are two ways to add the Exchange Management Shell tools to your standard PowerShell profile.

1. Using Implicit Remoting

We already looked at the commands for performing implicit remoting with Exchange. You can simply add that code to your PowerShell profile. Every time you start PowerShell, you will have the Exchange Management Shell commands imported into your session.

2. Using the Exchange Snap-in

Technically, you'd want to use implicit remoting even if the tools are installed, since that's the supported way and what makes RBAC possible. But, you can also setup a PowerShell profile using the Exchange snap-in if you so choose; add the following code to your profile:
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010
. $env:ExchangeInstallPath\bin\RemoteExchange.ps1
Connect-ExchangeServer -auto

This will add the snap-in, dot source the RemoteExchange.ps1 to load the helper functions and gloabal variables, and then connect to an Exchange server using autodiscover. Keep in mind that adding the snap-in like this isn't actually supported. It will work but you'll need the appropriate AD permissions since you are essentially bypassing RBAC by not using remoting.
There are a lot of changes in Exchange 2010, and as you can see the PowerShell management is no exception. I hope this information has been helpful.

Tuesday, February 1, 2011

WHAT'S NEW IN EXCHANGE 2010


NEW FEATURES IN EXCHANGE 2010    





Microsoft Exchange Server 2010 brings a new and rich set of technologies, features, and services to the Exchange Server product line. New features and functionality in Exchange 2010 support several key concepts:
  • Flexible and reliable
  • Anywhere access
  • Protection and compliance
The following sections provide you with an overview of some of the important new features and functionality, which you can use when you're planning, deploying, and administering your Exchange 2010 organization.
(For information about features that have been discontinued or de-emphasized from Microsoft Exchange Server 2003 or Exchange Server 2007 to Exchange 2010, see Discontinued Features [ http://technet.microsoft.com/en-us/library/aa998911.aspx ] .)
For information about the features and changes that have been added in Exchange 2010 SP1, see What's New in Exchange 2010 SP1 [ http://technet.microsoft.com/en-us/library/ff459257.aspx ] .
The pressure to optimize your IT infrastructure to respond to changing business conditions demands agility and that means investing in solutions that provide you and your organization choice. Exchange 2010 gives you the flexibility to tailor your deployment based on your organization's unique needs and a simplified way to help keep e-mail continuously available for your users.
Exchange 2010 integrates high availability into the core architecture of Exchange to enable customers of all sizes and in all segments to economically deploy a messaging continuity service in their organization.
Exchange 2010 includes many changes to its core architecture. In Exchange 2010, new features such as incremental deployment, mailbox database copies, and database availability groups work with other features such as shadow redundancy and transport dumpster to provide a new, unified platform for high availability and site resilience.
For more information about high availability features, see New High Availability and Site Resilience Functionality [ http://technet.microsoft.com/en-us/library/dd335211.aspx ] .
The following is a list of core store functionality that's included or has been changed in Exchange 2010:
  • Deprecated storage groups
  • Mailbox databases no longer connected to the server object
  • Improvements in Extensible Storage Engine (ESE) for high availability, performance, and database mobility
  • Flattened Outlook store schema
  • Enhanced reporting with public folders
For more information about Exchange store and mailbox database features, see New Exchange Core Store Functionality [ http://technet.microsoft.com/en-us/library/bb125040.aspx ] .
In Exchange 2010, Role Based Access Control (RBAC) replaces the permissions model used in Exchange 2007. Using RBAC, you can define extremely broad or extremely precise permissions models based on the roles of your administrators and users.
For administrators and specialist users, management role groups define what these users can manage in the organization. Role groups associate role group members to a set of management roles that define what the members can do. By adding or removing users as members of role groups, and adding or removing role assignments to or from a role group, you can control what aspects of the organization the members can manage.
For end users, management role assignment policies define what users can configure on their own mailbox. Assignment policies are applied to every mailbox either by default or manually, and enable you to control whether users can change their personal information, contact information, distribution group membership, and so on.
Both role groups and role assignment policies are assigned management roles. Management roles control access to the cmdlets and parameters required to perform a task. For example, if a cmdlet exists on a management role, and that role is assigned to a role group, the members of that role group can then use that cmdlet.
For more information about RBAC features, see Understanding Permissions [ http://technet.microsoft.com/en-us/library/dd297943.aspx ] .
The following is a list of new transport and routing functionality included in Exchange 2010:
  • Shadow redundancy
  • MailTips
  • Moderated transport
  • Federated delivery
  • Latency service level agreement (SLA) management
  • End-to-end message tracking
  • Incremental EdgeSync
  • Transport rules integration with AD RMS
  • Transport dumpster improvements
  • Transport database improvements
For more information about transport features, see New Transport Functionality [ http://technet.microsoft.com/en-us/library/ee633463.aspx ] .
Exchange Server 2010 introduces the Exchange Server Deployment Assistant, or ExDeploy, a new Web-based tool that can help you with your Exchange deployment. ExDeploy asks you a few questions about your current environment and then generates a custom checklist and procedures that help simplify your deployment.
For more information, see Exchange 2010 Deployment Assistant [ http://technet.microsoft.com/en-us/library/ee681665.aspx ] .
The following is a list of the new core Exchange Management Console (EMC) features included in Exchange 2010. The core EMC refers to new functionality that affects how you use the EMC, and not how you use specific features:
  • Ability to add Exchange forests to the console tree
  • Customer Feedback start tab
  • Community and Resources
  • EMC command logging
  • Property dialog box command exposure
  • RBAC permissions aware for the EMC
  • Online Exchange Help
For more information about EMC features, see New Administrative Functionality in the Exchange Management Console [ http://technet.microsoft.com/en-us/library/dd335120.aspx ] .
The following is a list of features available in the new Exchange Management Shell:
  • Remote administration   With the new Shell, you can connect to remote servers running Exchange 2010 across the network with only Windows Management Framework installed, which includes Windows PowerShell. For more information, see Overview of Exchange Management Shell [ http://technet.microsoft.com/en-us/library/dd297939.aspx ] .
  • RBAC integration   The Shell works with RBAC to give you and your users access only to the cmdlets and parameters you and they are allowed to use. If your permissions don't allow you to configure a certain feature, you aren't given access to the cmdlets, parameters, or both, that manage that feature. For more information, see Understanding Role Based Access Control [ http://technet.microsoft.com/en-us/library/dd298183.aspx ] .
  • Administrator audit logging   Actions that result in the modification of Exchange organization configuration and other object properties in the EMC, the Web management interface, and the Shell can now be logged for later review. For more information, see Overview of Administrator Audit Logging [ http://technet.microsoft.com/en-us/library/dd335052.aspx ] .
  • Improved multiple-valued property syntax   Instead of running multiple commands to add and remove values from a single property, you can now add and remove values with a single command. For more information, see Modifying Multivalued Properties [ http://technet.microsoft.com/en-us/library/bb684908.aspx ] .
Administrators can use the Exchange Control Panel for Outlook Web App to manage some on-premises tasks. The following is a list of the administrative features available:
  • Text messaging integration
  • Voice messaging integration
  • Multiple mailbox search
  • Additional proxy addresses for mailboxes
  • Moderation and approval for distribution list submission
In addition, users have self-service capabilities in that they can perform administrative tasks via the Exchange Control Panel. The ECP enables users to perform common tasks without having to call the help desk. This allows your users to be more productive and allows IT staff to deliver more, while reducing support costs.
For more information, see Configure ECP Virtual Directory Properties [ http://technet.microsoft.com/en-us/library/dd876904.aspx ] .
The following is a list of the new mailbox and recipient functionality that's included or has been changed in Exchange 2010:
  • Ability for users to share information, such as calendar free/busy information and contacts with users who reside in a different organization
  • Improved scheduling and configuring for resource mailbox calendar processing
  • Ability to move a mailbox while the end user is still accessing it
  • Additional parameters added to distribution group cmdlets to allow users to create and manage their own distribution groups in Outlook Web App and Exchange 2010
  • Ability to appoint a moderator to regulate the flow of messages sent to a distribution group
  • Ability to manage folder-level permissions for all folders within a user's mailbox
  • Expanded bulk recipient management to allow you to bulk manage recipient properties
  • Ability to send mail to recipients from the EMC
For more information about mailbox and recipient features, see New Mailbox and Recipient Functionality [ http://technet.microsoft.com/en-us/library/dd298027.aspx ] .
The Microsoft Exchange Web Services (EWS) Managed API 1.0 provides a managed interface for developing client applications that use Exchange Web Services. Beginning with Exchange 2007 Service Pack 1 (SP1), the EWS Managed API simplifies the implementation of applications that communicate with Exchange. Built on the Exchange Web Services SOAP protocol and Autodiscover, the EWS Managed API provides a .NET interface to Exchange Web Services that's designed to be easy to learn, use, and maintain.
For more information, see Introducing the Exchange Web Services Managed API 1.0 [ http://go.microsoft.com/fwlink/?LinkId=168445 ] and Microsoft Exchange Web Services Managed API 1.0 [ http://go.microsoft.com/fwlink/?LinkId=168443 ] .
Exchange 2010 uses client throttling policies to manage the performance of your Exchange organization. To do this, Exchange tracks the resources that each user consumes and enforces connection bandwidth limits as necessary.
Some of the benefits of client throttling include making sure that:
  • Users aren't intentionally or unintentionally taxing the system.
  • Users of various connectivity methods are proportionally sharing resources.
You manage client throttling policies with Shell cmdlets. For more information about client throttling policies, see Understanding Client Throttling Policies [ http://technet.microsoft.com/en-us/library/dd297964.aspx ] .
Enhancements in Exchange 2010 helps users get more done by helping them to access all of their communications—e-mail, voice mail, instant messaging—from virtually any platform, Web-browser, or device through industry standard protocols. Managing the flow of information into and out of an individual’s inbox daily can create overload and affect productivity and profitability. In response to this challenge, Exchange 2010 adds new productivity features that can help users more easily organize and effectively prioritize their communications.
The following is a list of new Unified Messaging features included in Exchange 2010:
  • Call answering rules
  • Additional language support included in Outlook Voice Access
  • Enhancements to name lookup from caller ID
  • Voice Mail Preview
  • Message Waiting Indicator
  • Missed call and voice mail notifications using text messaging
  • Protected Voice Mail
  • Incoming fax support
  • Addressing to groups (personal distribution lists) support
  • Built-in Unified Messaging administrative roles
For more information about Unified Messaging and voice mail features, see New Unified Messaging Functionality and Voice Mail Features [ http://technet.microsoft.com/en-us/library/dd351281.aspx ] .
The following is a list of new features in Outlook Web App included in Exchange 2010:
  • Favorites in the navigation pane
  • Search folders
  • Message filtering
  • Ability to set categories in the message list
  • Options in the Web management interface for Outlook Web App
  • Side-by-side view for calendars
  • Multiple client language support
  • Ability to attach messages to messages
  • Expanded right-click capabilities
  • Integration with Office Communicator, including presence, chat, and a contact list
  • Conversation view
  • Ability to send and receive text messages from Outlook Web App
  • Outlook Web App mailbox policies
For more information about Outlook Web App features, see Understanding Outlook Web App [ http://technet.microsoft.com/en-us/library/aa998629.aspx ] .
The following is a list of new Exchange ActiveSync features included in Exchange 2010:
  • Conversation grouping of e-mail messages
  • Ability to synchronize or not synchronize an entire conversation
  • Synchronization of SMS messages with a user's Exchange mailbox
  • Support for viewing of message reply status
  • Support for availability information for contacts
The following is a list of new text messaging features included in Exchange 2010:
  • Missed call and voice mail notifications
  • Calendar and agenda updates
  • Text messages sent and received through Outlook Web App and Outlook 2010
  • Text message synchronization with a mobile phone
Cross-site POP3 and IMAP4 client connectivity is supported by default in Exchange 2010. For more information about POP3 and IMAP4 client connectivity features, see Understanding POP3 and IMAP4 [ http://technet.microsoft.com/en-us/library/bb124107.aspx ] .
Exchange 2010 delivers new, integrated e-mail archiving and retention functionality, including granular multi-mailbox search and immediate legal hold. Exchange 2010 also helps you to better protect your company’s communications and e-mail through centrally managed information control capabilities. This includes the ability to more effectively intercept, moderate, encrypt, and block e-mail messages. Together, this functionality provides you with a flexible range of protection and control options, whether you want to automatically enforce controls or empower users to implement their own data protection.
Exchange 2010 compliance features make retention independent of users' mailbox management and filing habits, and ensure retention policies are applied continuously. The following is a list of new messaging and compliance features included in Exchange 2010:
  • Additional messaging records management (MRM) functionality to apply message retention policies
  • Personal Archive feature to provide users with online archive mailboxes and help eliminate .pst files
  • Mailbox search features for cross-mailbox search with Advanced Query Syntax (AQS) support
  • Additional transport rules predicates and actions
For more information about messaging policy and compliance features, see New Messaging Policy and Compliance Functionality [ http://technet.microsoft.com/en-us/library/dd351165.aspx ] .
The following is a list of new Information Rights Management (IRM)-protected e-mail functionality with Active Directory Rights Management Services (AD RMS) included in Exchange 2010:
  • Microsoft Outlook protection rules, to apply IRM-protection to messages in Outlook 2010
  • Transport protection rules, to apply IRM protection to messages based on rule conditions
  • Persistent protection of attachments in IRM-protected messages
  • Support for AD RMS templates
  • Support for IRM in Microsoft Office Outlook Web App
  • Transport decryption, to decrypt IRM-protected messages to apply messaging policies
  • Journal report decryption, to attach a decrypted copy of IRM-protected messages to journal reports
  • AD RMS protection for Unified Messaging voice mail messages
For more information about IRM features, see Information Rights Management [ http://technet.microsoft.com/en-us/library/dd351035.aspx ] .

Saturday, January 29, 2011

FSMO ROLES

This article describes how to transfer Flexible Single Master Operations (FSMO) roles (also known as operations master roles) by using the Active Directory snap-in tools in Microsoft Management Console (MMC) in Windows Server 2003.

FSMO Roles

In a forest, there are at least five FSMO roles that are assigned to one or more domain controllers. The five FSMO roles are:
  • Schema Master: The schema master domain controller controls all updates and modifications to the schema. To update the schema of a forest, you must have access to the schema master. There can be only one schema master in the whole forest.
  • Domain naming master: The domain naming master domain controller controls the addition or removal of domains in the forest. There can be only one domain naming master in the whole forest.
  • Infrastructure Master: The infrastructure is responsible for updating references from objects in its domain to objects in other domains. At any one time, there can be only one domain controller acting as the infrastructure master in each domain.
  • Relative ID (RID) Master: The RID master is responsible for processing RID pool requests from all domain controllers in a particular domain. At any one time, there can be only one domain controller acting as the RID master in the domain.
  • PDC Emulator: The PDC emulator is a domain controller that advertises itself as the primary domain controller (PDC) to workstations, member servers, and domain controllers that are running earlier versions of Windows. For example, if the domain contains computers that are not running Microsoft Windows XP Professional or Microsoft Windows 2000 client software, or if it contains Microsoft Windows NT backup domain controllers, the PDC emulator master acts as a Windows NT PDC. It is also the Domain Master Browser, and it handles password discrepancies. At any one time, there can be only one domain controller acting as the PDC emulator master in each domain in the forest.
You can transfer FSMO roles by using the Ntdsutil.exe command-line utility or by using an MMC snap-in tool. Depending on the FSMO role that you want to transfer, you can use one of the following three MMC snap-in tools:
Active Directory Schema snap-in
Active Directory Domains and Trusts snap-in
Active Directory Users and Computers snap-in
If a computer no longer exists, the role must be seized. To seize a role, use the Ntdsutil.exe utility.

Transfer the Schema Master Role

Use the Active Directory Schema Master snap-in to transfer the schema master role. Before you can use this snap-in, you must register the Schmmgmt.dll file.

Register Schmmgmt.dll

  1. Click Start, and then click Run.
  2. Type regsvr32 schmmgmt.dll in the Open box, and then click OK.
  3. Click OK when you receive the message that the operation succeeded.

Transfer the Schema Master Role

  1. Click Start, click Run, type mmc in the Open box, and then click OK.
  2. On the File, menu click Add/Remove Snap-in.
  3. Click Add.
  4. Click Active Directory Schema, click Add, click Close, and then click OK.
  5. In the console tree, right-click Active Directory Schema, and then click Change Domain Controller.
  6. Click Specify Name, type the name of the domain controller that will be the new role holder, and then click OK.
  7. In the console tree, right-click Active Directory Schema, and then click Operations Master.
  8. Click Change.
  9. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the Domain Naming Master Role

  1. Click Start, point to Administrative Tools, and then click Active Directory Domains and Trusts.
  2. Right-click Active Directory Domains and Trusts, and then click Connect to Domain Controller.

    NOTE: You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.
  3. Do one of the following:
    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

      -or-
    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  4. In the console tree, right-click Active Directory Domains and Trusts, and then click Operations Master.
  5. Click Change.
  6. Click OK to confirm that you want to transfer the role, and then click Close.

Transfer the RID Master, PDC Emulator, and Infrastructure Master Roles

  1. Click Start, point to Administrative Tools, and then click Active Directory Users and Computers.
  2. Right-click Active Directory Users and Computers, and then click Connect to Domain Controller.

    NOTE: You must perform this step if you are not on the domain controller to which you want to transfer the role. You do not have to perform this step if you are already connected to the domain controller whose role you want to transfer.
  3. Do one of the following:
    • In the Enter the name of another domain controller box, type the name of the domain controller that will be the new role holder, and then click OK.

      -or-
    • In the Or, select an available domain controller list, click the domain controller that will be the new role holder, and then click OK.
  4. In the console tree, right-click Active Directory Users and Computers, point to All Tasks, and then click Operations Master.
  5. Click the appropriate tab for the role that you want to transfer (RID, PDC, or Infrastructure), and then click Change.
  6. Click OK to confirm that you want to transfer the role, and then click Close.

Thursday, January 27, 2011

UNDERSTANDING DIRECT PUSH IN EXCHANGE 2010


Direct Push is a feature that's built into Microsoft Exchange Server 2010. Direct Push keeps a mobile phone current over a cellular network connection. It provides notification to the mobile phone when new content is ready to be synchronized to the mobile phone.
Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Overview
For Direct Push to work, the mobile phone or other mobile device must be Direct Push capable. These devices include the following:
  • Mobile phones that have Windows Mobile 5.0 with the Messaging and Security Feature Pack (MSFP) or a later version of Windows Mobile.
  • Mobile phones that are produced by Microsoft Exchange ActiveSync licensees and are designed specifically to be Direct Push compatible.
By default, Direct Push is enabled in Exchange 2010. Mobile phones that support Direct Push issue a long-lived HTTPS request to the server running Microsoft Exchange. The Exchange server monitors activity on the user's mailbox and sends a response to the device if there are any changes, such as new or changed e-mail messages or calendar or contact items. If changes occur within the lifespan of the HTTPS request, the Exchange server issues a response to the device that states that changes have occurred and the device should initiate synchronization with the Exchange server. The device then issues this request to the server. When synchronization is complete, a new long-lived HTTPS request is generated to start the process again. This guarantees that e-mail, calendar, contact, and task items are delivered quickly to the mobile phone, and the device is always synchronized with the Exchange server.
Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Direct Push Topology
The following figure shows a typical Exchange 2010 topology that's configured for Direct Push. This figure assumes you have the Client Access and Mailbox server roles installed on two separate Exchange computers. You can also install both server roles on the same physical Exchange 2010 computer.
Direct Push network design
Direct Push Topology
Direct Push operates in the following way:
  1. A mobile phone that's configured to synchronize with an Exchange 2010 server issues an HTTPS request to the server. This request is known as a PING. The request tells the server to notify the device if any items change in any folder that's configured to synchronize in the next 15 minutes. Otherwise, the server should return an HTTP 200 OK message. The mobile phone then stands by. The 15-minute time span is known as a heartbeat interval.
  2. If no items change in 15 minutes, the server returns a response of HTTP 200 OK. The mobile phone receives this response, resumes activity (known as waking up), and issues its request again. This restarts the process.
  3. If any items change or new items are received within the 15-minute heartbeat interval, the server sends a response that informs the mobile phone that there's a new or changed item and provides the name of the folder in which the new or changed item resides. After the mobile phone receives this response, it issues a synchronization request for the folder that has the new or changed items. When synchronization is complete, the mobile phone issues a new PING request and the whole process starts over.
Direct Push depends on network conditions that support a long-standing HTTPS request. If the carrier network for the mobile phone or the firewall doesn't support long-standing HTTPS requests, the HTTPS request is stopped. The following steps describe how Direct Push operates when a mobile phone's carrier network has a time-out value of 13 minutes:
  1. A mobile phone issues an HTTPS request to the server. The request tells the server to notify the device if any items change in any folder that is configured to synchronize in the next 15 minutes. Otherwise, the server should return an HTTP 200 OK message. The mobile phone then stands by.
  2. If the server does not respond after 15 minutes, the mobile phone wakes up and concludes that the connection to the server was timed out by the network. The device reissues the HTTPS request, but this time it uses a heartbeat interval of 8 minutes.
  3. After 8 minutes, the server sends an HTTP 200 OK message. The device then tries to gain a longer connection by issuing a new HTTPS request to the server that has a heartbeat interval of 12 minutes.
  4. After 4 minutes, a new e-mail message is received and the server responds by sending an HTTPS request that tells the device to synchronize. The device synchronizes and reissues the HTTPS request that has a heartbeat of 12 minutes.
  5. After 12 minutes, if there are no new or changed items, the server responds by sending an HTTP 200 OK message. The device wakes up and concludes that network conditions support a heartbeat interval of 12 minutes. The device then tries to gain a longer connection by reissuing an HTTPS request that has a heartbeat interval of 16 minutes.
  6. After 16 minutes, no response is received from the server. The device wakes up and concludes that network conditions cannot support a heartbeat interval of 16 minutes. Because this failure occurred directly after the device tried to increase the heartbeat interval, it concludes that the heartbeat interval has reached its maximum limit. The device then issues an HTTPS request that has a heartbeat interval of 12 minutes because this was the last successful heartbeat interval.
The mobile phone tries to use the longest heartbeat interval the network supports. This extends battery life on the device and reduces how much data is transferred over the network. Mobile carriers can specify a maximum, minimum, and initial heartbeat value in the registry settings for the mobile phone.
Description: http://i.msdn.microsoft.com/Global/Images/clear.gif Configuring Direct Push to Work Through Your Firewall
For Direct Push to work through your firewall, you must open TCP port 443. This port is required for Secure Sockets Layer (SSL) and must be opened between the Internet and the Client Access server.
In addition to opening ports on your firewall, for optimal Direct Push performance, you should increase the time-out value on your firewall from the default of 15 minutes to 30 minutes. The maximum length of the HTTPS request is determined by the following settings:
  • The maximum time-out value that's set on the firewalls that control the traffic from the Internet to the Client Access server
  • The Firewall time-out values that are set by the mobile service provider

Monday, January 10, 2011

COMPLETE RECOVERY SOLUTION FOR EXCHANGE SERVER 2007

Disaster Recovery with Exchange Server 2007

Solutions in this blog:-
  • Backing Up Exchange 2007 Using Windows 2003 Backup
  • Restoring Exchange 2007 Storage Groups and Databases Using Windows 2003 Backup
  • Repairing a Corrupt or Damaged Exchange 2007 Database Using Eseutil
  • Restoring Mailbox Data Using the Recovery Storage Group Feature
  • Recovering an Exchange 2007 Server Using the RecoverServer Switch
  • Recovering an Exchange 2007 Cluster Using the RecoverCMS Switch
  • Restoring Mailbox Databases Using the Improved Database Portability Feature

Introduction

As mentioned in the previous chapter, the messaging and collaboration servers are mission critical, being perhaps the most vital servers in our datacenters today. It’s therefore of the utmost importance that these servers be up and running all the time. Most service level agreements today require more than 99.99 percent uptime when it comes to the messaging and collaboration servers in the organization. In the previous chapter we showed you some of the options available to provide high availability of the Exchange 2007 Mailbox Servers. But even if you have HA solutions such as CCR-based mailbox servers available, a disaster can still strike in your environment, and if this happens, you better be prepared since downtime typically means lost productivity and revenue. In this chapter, we’ll go through the steps necessary to back up the different Exchange 2007 Server roles in your organization, and, just as important, look at how you restore Exchange 2007 servers and data should it be required.

Backing Up Exchange 2007 Using Windows 2003 Backup

Frequent backups of the Exchange 2007 servers in an organization are important operational tasks that, though a bit trivial, should be taken very seriously. I can only imagine one thing worse than a complete failure of an Exchange 2007 server, and that’s a complete failure of an Exchange 2007 server without any backups to restore from. In the first section of this chapter, we’ll take a look at what you must back up, depending on which Exchange 2007 Server roles were deployed in your organization.

Backing Up an Exchange 2007 Mailbox Server

One of the most important things to back up regarding Exchange 2007 Mailbox Servers are the databases, which hold user mailboxes and public data. As you saw in the previous chapter, Exchange 2007 provides a new continuous replication functionality that keeps a second copy of one or more databases in a storage group in sync with the active versions of the databases using log file shipping and replay. This provides an extra level of protection for Mailbox and Public Folder databases. However, although the new functionality allows you to make less frequent backups of your databases, it doesn’t eliminate the need for database backups. In this section, we’ll show you how to perform a backup of the databases on an Exchange 2007 server.
NoteAnother reason why it’s crucial to conduct frequent full backups of your Exchange databases with an Exchange-aware backup application is to commit and delete any transaction log files generated since the last full backup. If these log files aren’t committed, they will take up more and more space on your disks, and when there’s no more disk space for the log files, the database will be dismounted.
Since Exchange 2007 databases still use ESE, you can (just as with previous versions of Exchange), back them up using the Exchange-aware native Windows 2003 backup tool. Exchange 2007 supports two different backup methods. The first is a legacy streaming backup method based on the ESE application programming interface (API), which allows you to back up one or more storage groups at the same time. However, only one backup job can run against a specific storage group. Most of us are familiar with this type of backup since it’s the one we have used for ages when referring to Exchange databases. The ESE API backup method is supported by the Windows 2003 backup tool, as well as most third-party backup products.
Then we have the Volume Shadow Copy Service (VSS) backup method, which some of you may know from Exchange 2003 where it was first introduced. The interesting thing about VSS is that this method, in addition to what the legacy streaming backup method offers, can also make an online backup of the copy database when using either Local Continuous Replication or Cluster Continuous Replication in your setup. This means you can schedule the backup windows anytime you want since taking a backup of the database copy has no performance-related impact on the active database. Unfortunately, this method isn’t supported by the Windows 2003 backup tool when speaking Exchange databases (only file level backups), and Microsoft doesn’t offer any products capable of using VSS, at least not at the time of this writing.
NoteThe Data Protection Manager (DPM) v2 product will support VSS backups, however. DPM is a server software application that enables disk- and tape-based data protection and recovery for file servers, servers running Microsoft Exchange, and servers running Microsoft SQL Server in an Active Directory Domain Services (AD DS) domain. DPM performs replication, synchronization, and recovery point creation to provide reliable protection and rapid recovery of data for both system administrators and end users.
Let’s go through the steps necessary to back up an Exchange 2007 Mailbox and Public Folder database on an Exchange 2007 Mailbox Server. The first thing you need to do is launch the Windows 2003 backup tool, which can be done by clicking Start | Run and typing NTBackup. Now click Switch to Advanced Mode and then click the Backup tab shown in Figure 9.1.

Figure 9.1:
Windows 2003 Backup Tool
Under the Backup tab expand Microsoft Exchange Server | Mailbox Server | Microsoft Information Store and check the storage group(s) containing the Mailbox and Public Folder database (Figure 9.2). Now specify the backup media or filename you want to perform the backup to, and then click Start Backup.

Figure 9.2: Selecting the Storage Groups to Be Backed Up
As you can see in Figure 9.3, you now have the option of entering a description for the respective backup job, as well as specify whether the backed-up data should be appended to an existing backup. In addition, you can create a scheduled backup job so it runs, let’s say, every day at midnight. By clicking the Advanced button, you also have the option of having the backed-up data verified when the job completes.

Figure 9.3: Backup Job Information
Typically, you should set up an automated backup job schedule, but for the purpose of this example we’ll just choose to back up the databases once. When ready, click Start Backup.
When the backup job has completed, you can view a report, which will contain any warnings or errors that might occur during the backup.
That’s how you back up the Mailbox and Public Folder databases, as well as commit and delete any existing transaction log files using the Windows 2003 Backup tool. Sounds simple, right?
Some of you might wonder whether there isn’t anything else you need to back up on an Exchange 2007 Mailbox Server? The answer is no critical files at least since you can always recover an Exchange 2007 Mailbox Server using the Setup /Mode:RecoverServer command (shown later in the chapter), but it’s always a good idea to back up the System State of the respective server as well.

Backing Up an Exchange 2007 Hub Transport Server

Since an Exchange 2007 Server with the Hub Transport Server role installed was designed to store all configuration data in the Active Directory configuration container, not much needs to be backed up on a server with this role installed either. But just as with the Mailbox server role, you should back up the System State.
Some of you may be wondering why I haven’t mentioned anything about backing up the message queues stored in an ESE database on an Exchange 2007 Hub Transport Server… Well, there shouldn’t be any need to do so since you can mount the message queues on another existing, or newly installed, Hub Transport server if required. You just need to retrieve the mail.que (which, by default, is located under C:\Program Files\Microsoft\Exchange Server\TransportRoles\data\Queue) from the failed Hub Transport server.
NoteStep-by-step instructions on how to move a message queue from a failed Hub Transport server to another Hub Transport server in the organization is outside the scope of this book, but you can find information on the topic by searching under “Working with the Queue Database on Transport Servers” in the Exchange 2007 Documentation Help file.
One thing you might want to back up regarding an Exchange 2007 Hub Transport Server is the Message Tracking and Protocol logs which, by default, are located under C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs. These files can be backed up using a file level backup.
As is the case with a Mailbox Server, you can recover a Hub Transport server using the Setup /Mode:RecoverServer command.

Backing Up an Exchange 2007 Client Access Server

When using Exchange 2007 Server with the Client Access Server role installed, there are several files you should back up. The first, and perhaps most important, to back up is the IIS Metabase, which among other things is used to store OWA Virtual Directory configuration data. You can back up the IIS configuration on a CAS using the following command:
get-owavirtualdirectory "owa (default web site)" | export-clixml owa.xml -depth 1
In order to restore the IIS configuration from the owa.xml file, you need to use a Windows PowerShell script similar to the following (save it as Restore-OWA.PS1 or use some other meaningful name):
$ErrorActionPreference = 'stop'
$savedprops = @(
'DirectFileAccessOnPublicComputersEnabled',
'DirectFileAccessOnPrivateComputersEnabled',
'WebReadyDocumentViewingOnPublicComputersEnabled',
'WebReadyDocumentViewingOnPrivateComputersEnabled',
'ForceWebReadyDocumentViewingFirstOnPublicComputers',
'ForceWebReadyDocumentViewingFirstOnPrivateComputers',
'RemoteDocumentsActionForUnknownServers',
'ActionForUnknownFileAndMIMETypes',
'WebReadyFileTypes',
'WebReadyMimeTypes',
'WebReadyDocumentViewingForAllSupportedTypes',
'AllowedFileTypes',
'AllowedMimeTypes',
'ForceSaveFileTypes',
'ForceSaveMimeTypes',
'BlockedFileTypes',
'BlockedMimeTypes',
'RemoteDocumentsAllowedServers',
'RemoteDocumentsBlockedServers',
'RemoteDocumentsInternalDomainSuffixList',
'LogonFormat',
'ClientAuthCleanupLevel',
'DefaultDomain',
'FormsAuthentication',
'BasicAuthentication',
'DigestAuthentication',
'WindowsAuthentication',
'GzipLevel',
'FilterWebBeaconsAndHtmlForms',
'NotificationInterval',
'DefaultTheme',
'UserContextTimeout',
'ExchwebProxyDestination',
'VirtualDirectoryType',
'RedirectToOptimalOWAServer',
'DefaultClientLanguage',
'LogonAndErrorLanguage',
'UseGB18030',
'UseISO885915',
'OutboundCharset',
'CalendarEnabled',
'ContactsEnabled',
'TasksEnabled',
'JournalEnabled',
'NotesEnabled',
'RemindersAndNotificationsEnabled',
'PremiumClientEnabled',
'SpellCheckerEnabled',
'SearchFoldersEnabled',
'SignaturesEnabled',
'ThemeSelectionEnabled',
'JunkEmailEnabled',
'UMIntegrationEnabled',
'WSSAccessOnPublicComputersEnabled',
'WSSAccessOnPrivateComputersEnabled',
'ChangePasswordEnabled',
'UNCAccessOnPublicComputersEnabled',
'UNCAccessOnPrivateComputersEnabled',
'ActiveSyncIntegrationEnabled',
'AllAddressListsEnabled',
'InternalUrl',
'ExternalUrl'
)
$vdir = import-clixml $args[0]
'Recreating "' + $vdir.name + '"' + ' owa version: ' + $vdir.owaversion
if ($vdir.owaversion -eq 'Exchange2007') {
new-owavirtualdirectory -website $vdir.website -internalurl
$vdir.internalurl -externalurl $vdir.externalurl
}
else {
new-owavirtualdirectory -website $vdir.website -owaversion $vdir.
owaversion -name $vdir.displayname -virtualdirectorytype $vdir.
virtualdirectorytype
}
$new = get-owavirtualdirectory $vdir.name
'Restoring properties'
foreach ($prop in $savedprops) {
if ($prop -eq 'ExchwebProxyDestination' -or $prop -eq
'VirtualDirectoryType') {
continue
}
$new.$prop = $vdir.$prop
}
$new | set-owavirtualdirectory
To restore the IIS configuration data that were saved in the owa.xml file, type Restore-OWA.PS1 owa.xml.
In addition to the IIS metabase, you should back up the System State and the files listed in Table 9.1.
Data Location
Microsoft Office Outlook Web Access Web site, and Web.config file C:\Program Files\Microsoft\Exchange Server\ClientAccess\Owa
IMAP4 and POP3 protocol settings  C:\Program Files\Microsoft\Exchange Server\ClientAccess\
Availability service Active Directory configuration container and file system, including the Web.config file
C:\Program Files\Microsoft\Exchange Server\ClientAccess\exchweb\ews
Autodiscover   IIS metabase
Exchange ActiveSync Active Directory configuration container
File system, including the Web.config file in the \ ClientAccess\Sync folder IIS metabase
Outlook Web Access virtual directories Active Directory configuration container and file system
C:\Program Files\Microsoft\Exchange Server\ClientAccess\
Web services configuration IIS metabase
Table 9.1: Files Needed to Restore the IIS Configuration
Like a Mailbox or Hub Transport Server, a Client Access Server can be restored using the Setup /Mode:RecoverServer command.

Backing Up an Exchange 2007 Unified Messaging Server

Exchange 2007 servers with the Unified Messaging (UM) role installed store most of the configuration data in the Active Directory, which means it’s very limited what you need to back up on the UM server itself.
Table 9.2 lists the files you need to back up.
Data Location
Custom audio prompts:
Custom audio files (.wav) for UM Dial Plans and UM Auto Attendants
Custom audio files (.wav) for telephone user interface (TUI) or Voice Access
C:\Program Files\Microsoft\Exchange Server\UnifiedMessaging\Prompts
Incoming calls: .eml and .wma files for each voicemail C:\Program Files\Microsoft\Exchange Server \UnifiedMessaging\temp
Table 9.2: Files to Back Up on Unified Messaging Server
In addition, you should back up the System State.
The rest of the configuration data is, as mentioned previously, stored in Active Directory, which makes it possible to restore using the Setup /Mode:RecoverServer command.

Backing Up an Exchange 2007 Edge Transport Server

An Exchange 2007 Server with the Edge Transport Server role installed can be restored by using a Cloned Configuration (employing the ImportEdgeConfig.ps1 script). For step-by-step instructions on how you deal with clone configuration, see Chapter 7. In addition to cloned configuration, you should back up System State as well as the Message Tracking and protocol logs, which are located in C:\Program Files\Microsoft\Exchange Server\TransportRoles\Logs. The message queues that are stored in an ESE database just like message queues on a Hub Transport server can be mounted on another Edge Transport server.

Restoring Exchange 2007 Storage Groups and Databases Using Windows 2003 Backup

So now that you have seen how to back up Mailbox and Public Folder databases, you should of course also be aware of how you restore these databases properly should you experience a database corruption or find them unusable in some other way. In this section, I’ll show you how to perform a restore of a Mailbox database from the backup set we created earlier in this chapter. When you restore a Mailbox or Public Folder database from a backup set, any associated transaction log files are restored as well. It’s important you understand that a restore of a Mailbox database will copy the database file (.EDB) into its original location on the disk, and thereby overwrite any existing .EDB file. In addition, any transaction log files will be copied to a temporary location, which can be specified when doing the actual restore. Upon the restore’s completion (hopefully without any serious warnings or errors!), the log files will be replayed into the restored version of the database. In addition to the log files, a file called Restore.env will also be copied to the specified temporary folder. This file keeps control of which storage group the log files belong to, as well as the database paths and range of log files that have been restored.
In order to restore the aforementioned Mailbox database, we need to perform the following steps. First, open the Exchange Management Console, expand Server Configuration, and then select the Mailbox subnode. Now choose the respective Mailbox server in the Result pane, and then dismount the Mailbox database, as shown in Figure 9.4.

Figure 9.4: Dismounting the Mailbox Database
Now open the properties page for the Mailbox database. Check This database can be overwritten by a restore (Figure 9.5) and click OK.

Figure 9.5: Allowing the Mailbox Database to Be Overwritten by a Restore
We’re now ready to restore the databases using the Windows 2003 Backup tool, so let’s launch this tool by clicking Start | Run and typing NTBackup, and then selecting the Restore and Manage Media tab. Expand the desired media item and backup set, then check the log files and mailbox database, as shown in Figure 9.6. We can then click Start Restore.

Figure 9.6:
Restoring the First Storage Group
You’ll be faced with a screen similar to the one shown in Figure 9.7. Here, you need to specify the server you want to restore the database to (the local server on which the Windows 2003 Backup tool is run is typically pre-entered here), and the temporary location for log and patch files. In addition, you need to specify whether the restore you’re performing is the last restore set. If you select this option, all the restored log files will be replayed automatically into the database after the restore has completed. You typically want to do this if you don’t have any incremental or differential backups of the database’s log files you need to restore after this restore. Finally, you have the option of specifying that the database should be mounted automatically after the restore has occurred. When you have made your selections, click OK.

Figure 9.7: Restoring Database Store Options
The restore will now begin. Depending on the size of the database, it will take some time to complete. Since the database in this example is under 11MB, the restore took less than a second, as you can see in Figure 9.8. When the restore has completed, you can click the Report button to see a detailed log of the restore process. When ready, click Close.

Figure 9.8:
Restore Completed Successfully
If your restore completed successfully, you can now switch back to the Exchange Management Console, where the restored Mailbox database should have been mounted automatically, and we can call the restore a success.
NoteIt’s beyond the scope of this book to show the steps necessary to restore a database to its last good known state using a combination of a full backup set and incremental or differential backups.

Repairing a Corrupt or Damaged Exchange 2007 Database Using Eseutil

There may be situations where you either don’t have a proper backup set to restore a particular database from, or perhaps you found out that the database you just restored to replace a corrupt or damaged database is also corrupt or damaged. This is where Extensible Storage Engine Utilities for Microsoft Exchange Server (Eseutil) comes in. Eseutil is a command-line utility that can be used to perform a range of database tasks including repair, offline defragmentation, and integrity checks. Eseutil hasn’t changed much from Exchange 2003 since Exchange still uses ESE databases when speaking Exchange 2007. This means that pretty much all of the switches and parameters available in Eseutil are the same as in previous versions. Since there are plenty of books and online documentation describing how you should approach fixing a corrupt database using Eseutil, I won’t include comprehensive information on how to use this utility in this book. Instead, I’ll provide you with the most common Eseutil switches, as well as a few examples.
Eseutil, as in previous versions, is located in the Bin folder under your Exchange installation path, which in Exchange 2007, by default, is C:\Program Files\Microsoft\Exchange Server. However, you no longer need to run the tool from that path; you can just open a Command Prompt window and type Eseutil, as shown in Figure 9.9.

Figure 9.9: Eseutil Modes
NoteYou can also run Eseutil directly from the Exchange Management Shell.
Before we move on, we want to stress that it’s very important you always try to restore your databases from a backup if possible, since there’s a good chance you will lose some data when performing a repair of a database. The reason for this is that Eseutil often needs to discard rows from tables or even entire tables. In addition, you should have a repaired database running in your production environment only for a temporary period, which means that after you have repaired a database, you should move all mailboxes from the database to a new one. Needless to say, you should also be sure to make a copy of the database before performing a repair using Eseutil.
NoteDid you know that when a database corruption occurs, 99.9 percent of the time it’s caused by the underlying hard disk drive subsystem? Yes, it’s true! This means there’s a pretty good chance the database corruption experienced is caused by an I/O issue on the disk set in your Exchange 2007 server. You should therefore always examine the Application and System logs, searching for any events that might indicate this to be the problem.
Eseutil /P can, in addition to the Mailbox and Public Folder databases, also be run against the ESE database-based message queues on either a Hub Transport or Edge Transport server in your Exchange 2007 organization.
To repair a corrupted or otherwise damaged database, run Eseutil with the /P switch. So, to repair a database called Mailbox Database.edb located in E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group, you would need to type:
Eseutil /P “E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Mailbox Database.edb”
After pressing Enter, you would receive the warning message shown in Figure 9.10.

Figure 9.10: An Eseutil Repair Warning
NoteYou must have the necessary amount of free space (equal to 110 percent of the database file size) on the disk containing the database before you can run Eseutil /P and Eseutil /D.
Click OK to proceed, and then wait until Eseutil has repaired the database. If the database is completed successfully, it’s highly recommended you perform a full backup of the database, since restoring a backup made before the repair would roll the database back to the state it was in at the time of the backup, which wouldn’t be very smart.
After you have run Eseutil /P against a database, also run Eseutil /D in order to fully rebuild indexes and defragment the database. In order to run Eseutil /D against the database, type:
Eseutil /D “E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\Mailbox Database.edb”
When an offline defragmentation has been completed, there’s one additional thing to do: repair the database at the application level (repair information and relationships between mailboxes, folders, items, and attachments) by running the Information Store Integrity Checker (Isinteg) utility with the -fix parameter. Figure 9.11 shows the parameters and syntaxes available for the Isinteg utility.

Figure 9.11: Isinteg Switches
If you aren’t comfortable running the Eseutil and Isinteg utilities manually on your databases, you also have the option of performing a repair using a wizard-driven interface. This is where the new Disaster Recovery Management tool, a sibling of tools such as the Exchange Best Practices Analyzer Tool (ExBPA), comes into play. To invoke this tool, click the Toolbox work center node in the navigation tree in the Exchange Management Console, then open the tool by selecting it in the Result pane and clicking Open Tool in the Actions pane (Figure 9.12).

Figure 9.12: Disaster Recovery Management Tool
The tool will now check if there is any tool or configuration file updates available on Microsoft.com, and if so, apply them without requiring a restart. Once any updates have been applied, click the Go to Welcome Screen link, then enter an identifying label for the activity, and click Next. When the tool has connected to the Active Directory, you will be presented with the task list shown in Figure 9.13. Here, you should select the Repair Database task.

Figure 9.13: Exchange Troubleshooting Assistant Tasks
Now select the storage group that contains the database you wish to repair, click Next, and on the Select Databases to Repair page, check the respective database, as I did in Figure 9.14. Then, click Next.

Figure 9.14: Selecting the Database to Repair
You will now need to read a repair task warning. I suggest you read it carefully. When you have done so, choose Continue to Perform Repair Task, and then click OK in the confirmation dialog box shown in Figure 9.15.

Figure 9.15: ExTRA Confirmation
The tool will now run Eseutil /P and then Eseutil /D, followed by Isinteg –fix –test alltests against the respective database, just like we did manually earlier in this section. After a while, depending on the size of the database, you will be taken to a Report Repair Results page where you can see if the actions completed without any issues, and if not, it will show an explanation why it didn’t.

Restoring Mailbox Data Using the Recovery Storage Group Feature

The Recovery Storage Group (RSG) feature, which was originally introduced back in Exchange 2003, gives you, the Exchange administrator, the option of mounting a second copy of a mailbox database (typically a mailbox database restored from backup) so you can extract data from one or more mailboxes in the respective database during working hours without affecting the production databases.
Depending on how much you have used the new Exchange 2007 Management Console (EMC), you may have noticed you can no longer create an RSG from within the EMC. With Exchange 2007, this is instead done using the new Database Recovery Management tool, which as you saw in the previous section, is found under the Exchange Toolbox work center, or by using the Exchange Management Shell (EMS).
When mounting a copy of a Mailbox database to an RSG, you can extract the data from a mailbox and then merge the data with another mailbox located in a mailbox database in a production storage group. You can also extract the data and copy it to a specific folder in another mailbox. With Exchange 2003 RTM, the data was extracted, copied, and merged with another mailbox or mailbox folder using the Microsoft Exchange Server Mailbox Merge Wizard (ExMerge) tool, but in Exchange 2003 SP1 the process was integrated into the Exchange 2003 System Manager GUI.
There are a few things you should be aware of when dealing with RSGs. First, they cannot be accessed by any protocols other than MAPI, and although they can be accessed using MAPI, this doesn’t mean you can connect to a mailbox stored in a recovery database using an Outlook MAPI client. MAPI is strictly used to access mailboxes using the Exchange Troubleshooting Assistant and the respective Exchange Management Shell cmdlets. In addition, you should be aware that you still cannot use RSGs to restore Public Folder data, only mailbox data. It’s also worth mentioning that even though you can create up to 50 storage groups on an Exchange 2007 Enterprise edition server, you’re limited to one RSG per server. However, it’s supported to add multiple mailbox databases to an RSG as long as all databases belong to the same storage group. Finally, you should note that although it’s possible to add a restored mailbox database to an RSG on another Exchange 2007 server, it’s important you understand that the Exchange 2007 server must belong to the same Active Directory forest.
With the preceding in mind, let’s move on and see how you manage RSGs.

Managing Recovery Storage Groups Using the Exchange Troubleshooting Assistant

You can create a Recovery Storage Group (RSG) either by using the Disaster Recovery Management tool, which is based on the Microsoft Exchange Troubleshooting Assistant (ExTRA), or by running the New-StorageGroup cmdlet with the –Recovery parameter in the Exchange Management Shell. 
To create the RSG using the Disaster Recovery Management tool, you should first launch it from beneath the Toolbox work center in the navigation tree of the Exchange Management Console (EMC). Let the tool check for any tool or configuration file updates available, and then click the Go to Welcome screen link. Enter an identifying label for this activity (such as Create RSG), and then click Next. In the Tasks list that appears, click Create a Recovery Storage Group, and then select the storage group you want to link with the recovery storage group, as shown in Figure 9.16. Then, click Next once again.

Figure 9.16: Selecting the Storage Group to Link with the RSG
Now it’s time to create the RSG, but before doing so you need to give it a name (the default name is Recovery Storage Group, which should be okay in most situations). When you have entered an appropriate name, click Create the recovery storage group (Figure 9.17).

Figure 9.17: Creating the RSG
After a little while, you will be presented with a screen similar to the one in Figure 9.18, and the RSG for the respective Mailbox database has now been created.

Figure 9.18: RSG Result
With the RSG created, we can move, copy, or restore database and transaction log files to the recovery storage group paths. To see the path for the recovery storage group log and database files, click Show Create Recovery Storage Group Information. By default, the path is C:\Program Files\Microsoft\Exchange Server\Mailbox\<Storage Group>\RSGxxxxxxxxx, as you can see in Figure 9.19. The RSGxxxxxxxxx folder will appear empty in Windows Explorer until you have moved, copied, or restored the database and transaction log files to it.

Figure 9.19: Storage Group and Recovery Storage Group Paths
For the purpose of this example, we will restore a Mailbox database from a backup using the Windows 2003 Backup tool. So let’s launch the Windows 2003 Backup tool in advanced mode, and then click the Restore and Manage Media tab. Here we need to select the Mailbox database and log files we want to restore. When you have done so, click the Start Restore button.
NoteNote that the Restore Files To: Drop-Down box is set to Original Location. Also notice we cannot change this selection. But does that mean the Mailbox database currently in production will be replaced by the one we restore from backup? No, this is not the case. First, we haven’t dismounted the production Mailbox database, and second, we haven’t enabled the This Database Can Be Overwritten By A Restore option on the Mailbox database property page. Because of this, the Mailbox database will be restored to the recovery storage group we just created.
Now specify the Exchange Server to which you want to restore the respective Mailbox database, and then enter a temporary location for the log and patch files. Lastly, check Last Restore Set (Log File Replay will start after this restore completes) since this is the last restore set. When you are done, click OK and wait for the restore job to complete. Then, click the Close button.
The respective files have now been restored to the RSGxxxxxxxxx folder, as you can see in Figure 9.20.

Figure 9.20: The Restored Mailbox Database in Windows Explorer
Since we didn’t check the Mount Database After Restore option, the Mailbox database will now be in a dismounted state. With this in mind, let’s switch back to the ExTRA Task Center. As shown in Figure 9.21, we now have several new recovery storage group–related tasks available. Since the Mailbox database needs to be mounted before we can extract data from it, we have to click Mount or dismount databases in the recovery storage group.

Figure 9.21: Selecting Mount or Dismount Databases in the Recovery Storage Group
On the Mount or Dismount Database page, check the respective Mailbox database and click Mount selected database (Figure 9.22).

Figure 9.22: Mounting the Mailbox Database Using the ExTRA Tool
Once the Mailbox database has been mounted, click Go back to task center, and then select Merge or copy mailbox content. This will bring us to a screen similar to the one shown in Figure 9.23, here you should just make sure the Mailbox database you wish to extract data from is selected, and then click Gather merge information.

Figure 9.23: Selecting a Mounted Database in the Recovery Storage Group
We now have the option of swapping the Mailbox database mounted to the RSG and the linked production Mailbox database (a recommended step if you’re performing a dial-tone database restore) by checking Swap Database Configurations, as can be seen in Figure 9.24. Since this option will swap the two databases, both of them need to be dismounted, which will affect mail service to the end users whose mailboxes are stored in the respective database.

Figure 9.24: The Database Swap Option
Since we aren’t dealing with a dial-tone database restore in this example, just click Next.
On the Select Merge Options page, click Perform pre-merge tasks (Figure 9.25).

Figure 9.25: Specifying Merge Options
NoteNote that you have the option of clicking Show Advanced Options. Under the Advanced options, we can specify different match and filtering options, as well as the bad item limit. This is also the place where you specified whether all merge mailbox data should be merged to the respective mailboxes in the production Mailbox database, or whether they should be copied to a single target mailbox.
The final step is to select the mailboxes you want to merge. You do this by checking the box to the left of each user name in the list, as shown in Figure 9.26.

Figure 9.26: Selecting the Mailboxes to Merge
Now wait for the tool to merge the mailbox data from the Mailbox database in the recovery storage group for the selected mailbox. When the mailbox data merge has completed, you should be able to see the content deleted from the production Mailbox database. You don’t even need to restart the Outlook or OWA client for the restored data to appear!
When you have merged or copied the required Mailbox data, you can use ExTRA to dismount and then remove the recovery storage group. Be sure you delete the files in the RSGxxxxxxxxx folder after you have removed it so the files don’t take up valuable disk space.

Managing Recovery Storage Groups Using the Exchange Management Shell

As mentioned earlier in this chapter, you can also manage an RSG using the Exchange Management Shell (EMS). If you know your cmdlets, restoring mailbox data from a Mailbox database in a recovery storage group can be done a lot faster than when you’re using ExTRA.
The first step is to create the RSG. In order to create an RSG via the EMS, you need to run the New-StorageGroup cmdlet with the –Recovery parameter. So, to create an RSG for the first storage group on a server named E2K7S04, type:
New-StorageGroup –Server E2K7S04 –LogFolderPath “E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSG –Name “Recovery Storage Group” –SystemFolderPath “E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSG” –Recovery
The LogFolderPath and SystemFolderPath parameters are used to specify where the RSG-related files should be located. As you can see, we specified they should them to be restored to a subfolder called RSG under E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSG. If you intend to do the same, please make sure there’s sufficient disk space available for the Mailbox database you’re restoring from backup.
To see if a respective storage group is a recovery storage group (as well as many other types of information), you can use the Get-StorageGroup <storage group name> | FL command. If the storage group is a recovery storage group, it will say True under Recovery, as shown in Figure 9.27

Figure 9.27: Full List of Recovery Storage Group Information
The next step is to add a recovery database (either moved, copied, or restored from backup) to the RSG, this is done by running the New-MailboxDatabase cmdlet with the MailboxDatabaseToRecover parameter. So, to add a recovery database to the recovery storage group on a server named E2KS04 with the edb file path pointing to E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSG, type:
New-MailboxDatabase –MailboxDatabaseToRecover “Mailbox Database” –StorageGroup “E2K7S04\Recovery Storage Group” –EDBFilePath “E:\Program Files\Microsoft\Exchange Server\Mailbox\First Storage Group\RSG\Mailbox Database.edb”
With the Mailbox Database created in the recovery storage group, we now need to configure it to allow overwrites by running the Set-MailboxDatabase cmdlet with the –AllowRestore parameter. To allow file restores for the recovery database just created, type:
Set-MailboxDatabase -Identity "E2K7S04\Recovery Storage Group\Mailbox Database" -AllowFileR
estore $true
Now that we have created a recovery database in the recovery storage group and allowed it to be overwritten by a file restore, it’s time to restore the mailbox database version from which you want to extract and copy or merge data to the mailbox database in production. To do so, launch the Windows 2003 Backup tool and restore the respective Mailbox database version using the same steps as we did when we used the ExTRA to recover Mailbox data.
We now need to mount the restore Mailbox database using the Mount-Database cmdlet. In order to do so, type:
Mount-Database –Identity “E2K7S04\Recovery Storage Group\Mailbox Database”
With the Mailbox database mounted, we can now extract Mailbox data from it. For example, if you want to merge the mailbox data of an existing user in the recovery database to the production Mailbox database, you need to type:
Restore-Mailbox –Identity <username> -RSGDatabase “servername\RSG name\database name”
In Figure 9.28, we recovered mailbox data for a user called Test User 1 on a server named E2K7S04.

Figure 9.28: Restoring Mailbox Data from a Mailbox in a Recovery Storage Group
NoteDepending on the size of the mailbox to be recovered, this merging process can take a long time.
If you need to recover mailbox data for all users in the RSG, you would need to use the following command:
Get-MailboxStatistics  -Database “Recovery Storage Group\Mailbox Database” | Restore-Mailbox
Let’s suppose the mailbox in the recovery database that you want to recover data from has in the meantime been deleted from the production Mailbox database. In this case, you have the option of recovering the mailbox data to a target folder in another mailbox by using the following command:
Restore-Mailbox –RSGMailbox “Test User 1” -RSGDatabase “servername\RSG name\database name” –Identity “Test User 2” –TargetFolder “Test User 1 Recovered data”
Just as with recovering data using the ExTRA tool, when using the Exchange Management Shell you should remember to remove the RSG after the required data has been recovered. To do so, first run the command to remove the recovery database:
Remove-MailboxDatabase –Identity “E2K7S04\Recovery Storage Group\Mailbox Database”
Click Yes to the confirmation warning, and then type the following command in order to remove the RSG:
Remove-StorageGroup –Identity “E2K7S04\Recovery Storage Group”
Finally, delete the RSG folder manually using Windows Explorer.

Recovering an Exchange 2007 Server Using the RecoverServer Switch

What could be worse than facing one or more seriously corrupted Exchange 2007 mailbox databases? Yes, you guessed right: facing a completely dead Exchange 2007 Server. In this section, I’ll shine some light on the steps necessary to restore an Exchange 2007 Server that has experienced a major hardware failure causing a complete loss of data. As is the case with Exchange 2000 and 2003, you can recover an Exchange 2007 Server in a fairly straightforward way. As you probably know, we could use the DisasterRecovery switch to recover a dead Exchange 2000 or 2003 Server on new hardware, but with Exchange 2007 this switch no longer exists. Instead, it has been replaced by the new RecoverServer switch, which is similar to the DisasterRecovery switch. The interesting thing about the RecoverServer switch is that it can be used to recover all types of Exchange 2007 Server roles, except the Edge Transport Server role, which uses ADAM and not the Active Directory to store configuration data.
NoteTo recover a server with the Edge Transport Server role installed, you must use the cloned configuration tasks to export and import configuration information. You can read more about the cloned configuration tasks in Chapter 7.
When you run Setup with the RecoverServer switch on a new Windows 2003 Server that is configured with the same name as the one that has crashed or is permanently down for some reason, Setup will read the configuration information for the respective Exchange 2007 server from the Active Directory. In addition to applying the roles and settings stored in Active Directory, Setup will, as is the case when installing an Exchange 2007 Server role without the RecoverServer switch, install the Exchange files and services required for the respective Exchange 2007 server role(s). This means that local customizations done on the server (such as Mailbox databases, Receive connectors, custom OWA settings, SSL certificates, and so on) need to be re-created or recovered manually afterwards.
In this section, we’ll go through the steps necessary to recover an Exchange 2007 server with the Hub Transport, Mailbox Server, and Client Access Server roles installed.

Restoring and Configuring the Operating System

When you have received a replacement server or replacements for the failed hardware components, it’s important you configure and partition the disk sets in the new server so they are identical to the way they were configured in the failed server. When the hardware is configured according to the documentation you wrote for the failed Exchange 2007 (which you did write, right?), we can begin installing the operating system from the Windows 2003 Server 64-bit media. When Windows 2003 Server has been installed, it’s important you install the Windows Components required by the Exchange Server 2007 Server roles, as well as any service packs and Windows updates that were applied on the failed server. For details about which Windows components are required for each server roles, refer back to Chapter 2.
In addition to that already mentioned, you should also make sure you name the new server with the same server name. Before doing so, however, it’s important the failed Exchange 2007 server be turned off. In addition, you should add the server to the respective Active Directory domain, first resetting the computer account for the respective Exchange 2007 server. In order to reset the computer account, you must perform the following steps:
  1. Log on to a domain controller or another server with the Adminpak installed in the Active Directory domain, and then open the Active Directory Users and Computers (ADUC) MMC snap-in.
  2. In the ADUC MMC snap-in, navigate to the organizational unit (OU) containing your computer accounts (by default, the Computers OU), right-click the computer account that should be reset, and then select Reset Account, as shown in Figure 9.29.

Figure 9.29: Resetting the Computer Account in the ADUC MMC Snap-in
  1. Click Yes to the warning in the dialog box that appears, and then click OK.
We can now join the new server to the domain without issues. Do so and perform the required reboot.

Installing Exchange 2007 Using the RecoverServer Switch

Now that Windows 2003 has been installed properly, we can move on and start installing Exchange 2007 by running Setup.exe with the RecoverServer switch. In order to do so, perform the following steps:
  1. Click Start | Run and type CMD. Then, press Enter.
  2. Change to the directory or media containing your Exchange 2007 Setup files, and then type Setup.com /M:RecoverServer. As can be seen in Figure 9.30, Exchange 2007 Setup will now prepare the Exchange 2007 setup, and then perform the mandatory prerequisite checks. Finally, it will begin to copy the Exchange files and then configure each Exchange 2007 Server role by reading the required configuration information from Active Directory.

Figure 9.30: Recovering an Exchange 2007 Server Using the RecoverServer Switch
NoteIf you’re recovering an Exchange 2007 server with the Hub Transport Server role installed, and this is the only Exchange 2007 server with this role installed, its recommended you run Setup.com /M:RecoverServer with the /DoNotStartTransport syntax since there’s a few post-recovery steps that should be completed before this role is made active.
When the Exchange setup has completed each phase successfully, we’re close to calling the server recovery a success. However, there are a few post-recovery steps that need to be finished, depending on what Exchange 2007 Server roles are installed on the server. It’s obvious a recovered server with the Mailbox Server role must have the respective Mailbox database and Public Folder database restored from backup, or copied back from the disks on the old server (if possible). If the Public Folders are replicated with other Exchange 2000/2003 or 2007 servers in the Exchange organization, you don’t need to restore it since an empty Public Folder database will be backfilled from the other Public folder server(s).
NoteIf you need to restore one or more Mailbox and/or Public Folder databases to the recovered server using the Windows 2003 Backup tool, note that you must catalog the respective backup (.BKF). This is done by selecting the Restore and Manage Media tab, and then clicking Tools | Catalog a backup file in the menu.
If the Hub Transport Server role is installed on the recovered Exchange 2007 server, you may also need to restore any saved message queue databases (which in Exchange 2007 are stored in an ESE database and not in the NTFS file system as was the case with Exchange 2000 and 2003) and place them in the right folder (should be done while the Microsoft Exchange Transport service is stopped, which is why it’s a good idea to run the RecoverServer switch with the /DoNotStartTransport syntax if you’re recovering an Exchange 2007 server with the Hub Transport Server role installed), as well as reconfigure any Receive connectors since these are stored locally on the Hub Transport Server and not in Active Directory, as is the case with Send Connectors.
In addition, you may need to restore the Client Access Server settings (custom OWA files and/or virtual directories). Custom virtual folder settings can be restored by using the script method mentioned earlier in this chapter.
NoteAlthough it should be the most comprehensive, as well as fastest, way to recover a server using the RecoverServer switch, it’s worth mentioning that it’s fully supported to restore an Exchange 2007 Server by restoring the System State as well as all the Exchange installation files. Bear in mind, however, that this method requires you restore Exchange 2007 on the same hardware.

Recovering an Exchange 2007 Cluster Using the RecoverCMS Switch

To finish off this chapter, we wanted to talk a little about how you can recover an Exchange 2007 clustered mailbox server (both CCR and SCC) by using the ExSetup.exe command with the RecoverCMS switch. Since we’re talking about restoring a cluster, many of you may think the tasks involved are terribly complex. As a matter of fact, it’s a relatively simple task. The biggest challenge is rebuilding the Windows 2003 cluster itself, which as you learned in Chapter 8, is a rather harmless process. Once you have rebuilt the Windows 2003 cluster on new hardware, you need to install the Passive Clustered Mailbox Role on one of the Windows 2003 cluster nodes, navigate to the Exchange Bin folder (which, by default, is located under C:\Program Files\Microsoft\Exchange Server\), and then run the following command:
ExSetup.exe /RecoverCMS /CMSName:<name of the clustered mailbox server> /CMSIPAddress:<IP address of the clustered mailbox server>
When the clustered mailbox server has been recovered successfully (if the recovered clustered mailbox server is based on a CCR), you need to enable replication as replication, which, by default, will be in a suspended state after recovery using the RecoverCMS switch. In addition you must (both when recovering a CCR and SCC) start the Exchange System Attendant service manually since it will stop right after the clustered mailbox server has been recovered.
The next step is to restore the respective Mailbox and/or Public Folder databases that existed on the failed clustered mailbox server from backup, or move/copy them from their respective locations.
NoteIf you’re recovering a Single Copy Cluster (SCC) and stored the Mailbox and Public Folder databases on a storage area network (SAN), you won’t need to restore the databases from backup as long as each node points to the same shared storage subsystem that the failed clustered mailbox server did.
When any required Mailbox and/or Public Folder databases have been restored, you should now install the Passive Clustered Mailbox Role on the second node (and if recovering an SCC, any additional nodes). If you recovered a clustered mailbox server that is based on SCC, we can now call the recovery of the clustered mailbox server a success, but if you use CCR, there’s one final task to complete, and that is to reseed the replica and resume replication. To reseed the second copy of the database(s), you should run the following command in the Exchange Management Shell:
Update-StorageGroupCopy -Identity: <Servername\Name of StorageGroup>
When the storage group(s) have been reseeded, you can resume replication by running:
Resume-StorageGroupCopy -Identity:<Servername>\Name of Storage Group>
So, this was not as difficult as you had imagined it, right?

Restoring Mailbox Databases Using the Improved Database Portability Feature

As those of you with plenty of disaster recovery experience from Exchange 2003 might be aware, Mailbox database portability (that is mounting a Mailbox database to an alternative Exchange Server) was rather limited in this version of Exchange, actually the only options available were to mount the respective Mailbox database into a recovery storage group (RSG), into a storage group on a server with the same name as the failed server, or into the storage group on an Exchange Server in the same administrative group. Although mailbox databases were portable between Exchange 2003 servers (on the same service pack level) in the same administrative group, certain tasks were involved with this procedure. You had to rename the Mailbox databases appropriately, as well as re-link each mailbox in the database to an Active Directory user account before the mailbox could be accessible to an end user. In addition, several other issues might exist if the Mailbox database contained a System Attendant mailbox. Finally, depending on what type of third-party applications were running on the particular Exchange server, it was also best practice to reboot the server once the Mailbox database move was completed.
With Exchange 2007, the Mailbox database portability feature has been improved drastically. Now you can port and recover a Mailbox database to any server in the Exchange 2007 organization, and because of the new Autodiscover service (which we discussed in Chapter 5), all Outlook 2007 clients will be redirected to the new server automatically the first time they try to connect after the Mailbox database has been mounted on another Exchange 2007 server.
NoteSince only Outlook 2007 clients can take advantage of the new Autodiscover service introduced in Exchange 2007, any legacy clients (Outlook 2003 and earlier) won’t be redirected to the new server automatically.
Some of you might wonder if Exchange 2007 (unlike Exchange 2003) allows you to port or recover a Public Folder database to another server. The answer is no. Doing so is still not supported since it will break Public Folder replication. The proper method for moving a Public Folder database to another server is to add the respective server to the Public Folder replica list.
Okay, now that you have heard how cool the new Mailbox database portability improvements in Exchange 2007 are, let’s take a look at the steps needed they entail:
First, it’s important you make sure the Mailbox database you wish to port or recover to another server is in a clean shutdown state. If not, you must perform a soft recovery of the database, which is done by running Eseutil /R <ENN> against it. ENN is the prefix of the storage group to which you want to commit any existing transaction log files. One method you can use to find this prefix is to open the property page of the respective storage group containing the Mailbox database you wish to port or recover to another Exchange 2007 server (see Figure 9.31).

Figure 9.31: The Transaction Log Files Prefix
Once the Mailbox database is in a clean shutdown state, the next step is to move the Mailbox database (.EDB file, transaction log files, and Exchange Search catalog) to the system path folder of the respective storage group on the other server, and then create a new Mailbox database in the storage group using the following command:
New-MailboxDatabase –StorageGroup <Servername>\<Name of Storage Group> -Name <Name of Mailbox Database>
In this example, you will mount a database named Mailbox database to the Third Storage Group on an Exchange 2007 Server called EHVMS08. Therefore, the command we need to run is shown in Figure 9.32.

Figure 9.32: Creating a New Mailbox Database in the Third Storage Group
Because Exchange 2007 won’t create an .EDB file for a newly created Mailbox database before it’s mounted for the first time, using the New-MailboxDatabse cmdlet to create a new Mailbox database, while the Mailbox Database.edb file is placed in the folder of the Third Storage Group will not conflict in any way. Actually, you can just move ahead and mount the ported Mailbox database.
NoteIt’s important that the name of the new Mailbox database you create using the New-MailboxDatabase cmdlet matches the name of the Mailbox database you ported or recovered from the old Exchange 2007 Server; otherwise, you won’t be able to mount it.
To mount the Mailbox database, you can use the Mount-Database “Mailbox Database” or the Exchange Management Console. When the Mailbox database has been mounted appropriately, there’s only one more task to complete, and that is to modify (re-link) the Active Directory user account objects associated with a mailbox in the Mailbox database that we ported to a new server, so they point to the correct server. This can be done by using the following command:
Get-Mailbox –Database “E2K7S04\Mailbox Database” | Move-Mailbox –TargetDatabase “EHVMS08\Mailbox Database” –ConfigurationOnly: $True
You then must confirm that you wish to perform this operation. Type Y for Yes, and press Enter.
NoteIf you receive an error when trying to run this command, check to make sure the Mailbox database is mounted on the old Exchange 2007 server.
Now would be a good time to access a few mailboxes (using Outlook 2007 or OWA 2007) stored in the Mailbox database we ported so you can verify the end users still have mailbox connectivity.

Summary

In this chapter, we took a look at how to properly back up the different server roles in Exchange 2007. We then went through how you restore an Exchange 2007 Server with one or more server roles installed, as well as how you can restore a corrupt Mailbox or Public Folder database using the Windows 2003 Backup tool, and if this isn’t an option, how you can repair a corrupt database using Eseutil. We also had walked through how you can recover mailbox data using the improved Recovery Storage Group (RSG) feature. In addition, I showed you how it’s possible to recover a failed Exchange 2007 server using the RecoverServer and RecoverCMS switches. Lastly, we talked about the improvements that have been made regarding database portability in Exchange 2007.