Applies to: Exchange Server 2013

Topic Last Modified: 2012-09-17

Use the New-DatabaseAvailabilityGroup cmdlet to create a database availability group (DAG).

For information about the parameter sets in the Syntax section below, see Syntax.

Syntax

New-DatabaseAvailabilityGroup -Name <String> [-Confirm [<SwitchParameter>]] [-DatabaseAvailabilityGroupIpAddresses <IPAddress[]>] [-DomainController <Fqdn>] [-ThirdPartyReplication <Disabled | Enabled>] [-WhatIf [<SwitchParameter>]] [-WitnessDirectory <NonRootLocalLongFullPath>] [-WitnessServer <FileShareWitnessServerName>]

Examples

EXAMPLE 1

This example creates the DAG DAG1 that's configured to use a witness server of CAS1, and a local directory of C:\DAG1. DAG1 is also configured to use DHCP for the DAG's IP addresses.

Copy Code
New-DatabaseAvailabilityGroup -Name DAG1 -WitnessServer CAS1 -WitnessDirectory C:\DAG1

EXAMPLE 2

This example creates the DAG DAG2. The system automatically selects a Client Access server without the Mailbox server role in the same site as the DAG to use as the witness server. DAG2 is assigned a single static IP address because the MAPI network for DAG2 contains or will contain a single subnet (10.0.0.x).

Copy Code
New-DatabaseAvailabilityGroup -Name DAG2 -DatabaseAvailabilityGroupIpAddresses 10.0.0.8

EXAMPLE 3

This example creates the DAG DAG3. DAG3 is configured to use a witness server of CAS1, and a witness directory of C:\DAG3. DAG3 is assigned multiple static IP addresses because the MAPI network for the DAG contains or will contain multiple subnets (10.0.0.x and 192.168.0.x).

Copy Code
New-DatabaseAvailabilityGroup -Name DAG3 -WitnessServer CAS1 -WitnessDirectory C:\DAG3 -DatabaseAvailabilityGroupIpAddresses 10.0.0.8,192.168.0.8

EXAMPLE 4

This example creates the DAG DAG4 configured to use DHCP. In addition, the witness server is automatically selected by the system and the default witness directory is created.

Copy Code
New-DatabaseAvailabilityGroup -Name DAG4

Detailed Description

When creating a DAG, you need to specify a valid computer name for the DAG no longer than 15 characters that's unique within the Active Directory forest. In addition, each DAG is configured with a witness server and witness directory. The witness server and its directory are used only for quorum purposes where there's an even number of members in the DAG. You don't need to create the witness directory in advance. Exchange automatically creates and secures the directory for you on the witness server. The directory shouldn't be used for any purpose other than for the DAG witness server.

The requirements for the witness server are as follows:

  • The witness server can't be a member of the DAG.

  • The witness server must be in the same Active Directory forest as the DAG.

  • The witness server must be running the Windows Server 2012, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003 R2, or Windows Server 2003 operating system.

  • A single server can serve as a witness for multiple DAGs; however, each DAG requires its own witness directory.

We recommend that you use a Client Access server running on Microsoft Exchange Server 2013 in the Active Directory site containing the DAG. This allows the witness server and directory to remain under the control of an Exchange administrator.

The following combinations of options and behaviors are available:

  • You can specify only a name for the DAG. In this scenario, the task searches for a Client Access server in the local Active Directory site that doesn't have the Mailbox server role installed, and it automatically creates the default directory and share on that server and uses that Client Access server as the witness server.

  • You can specify a name for the DAG, the witness server that you want to use, and the directory you want created and shared on the witness server.

  • You can specify a name for the DAG and the witness server that you want to use. In this scenario, the task creates the default directory on the specified witness server.

  • You can specify a name for the DAG and specify the directory you want created and shared on the witness server. In this scenario, the task searches for a Client Access server in the local Active Directory site that doesn't have the Mailbox server role installed, and it automatically creates the specified directory on that server, shares the directory, and uses that Client Access server as the witness server.

Important:
If the witness server you specify isn't an Exchange 2013 server, you must add the Exchange Trusted Subsystem universal security group (USG) to the local Administrators group on the witness server. If the witness server is a directory server, you must add the Exchange Trusted Subsystem USG to the Builtin\Administrators group. These security permissions are necessary to ensure that Exchange can create a directory and share on the witness server as needed.

In addition to providing a name for the DAG, one or more IP addresses must also be assigned to the DAG. You can assign static IP addresses to the DAG by using the DatabaseAvailabilityGroupIpAddresses parameter. If you omit this parameter, the task attempts to use Dynamic Host Configuration Protocol (DHCP) to obtain the necessary IP addresses.

You need to be assigned permissions before you can run this cmdlet. Although all parameters for this cmdlet are listed in this topic, you may not have access to some parameters if they're not included in the permissions assigned to you. To see what permissions you need, see the "Database availability groups" entry in the High Availability and Site Resilience Permissions topic.

Parameters

Parameter Required Type Description

Name

Required

System.String

The Name parameter specifies a unique name for the new DAG of up to 15 characters. The name you use must not conflict with any computer name in the organization.

Confirm

Optional

System.Management.Automation.SwitchParameter

The Confirm switch causes the command to pause processing and requires you to acknowledge what the command will do before processing continues. You don't have to specify a value with the Confirm switch.

DatabaseAvailabilityGroupIpAddresses

Optional

System.Net.IPAddress[]

The DatabaseAvailabilityGroupIpAddresses parameter specifies one or more static IP addresses to the DAG when a Mailbox server is added to a DAG. If you omit the DatabaseAvailabilityGroupIpAddresses parameter when creating a DAG, the system attempts to lease one or more IP addresses from a DHCP server in your organization to assign to the DAG. Setting the DatabaseAvailabilityGroupIpAddresses parameter to a value of 0.0.0.0 configures the DAG to use DHCP.

DomainController

Optional

Microsoft.Exchange.Data.Fqdn

The DomainController parameter specifies the fully qualified domain name (FQDN) of the domain controller that writes this configuration change to Active Directory.

ThirdPartyReplication

Optional

Microsoft.Exchange.Data.Directory.SystemConfiguration.ThirdPartyReplicationMode

The ThirdPartyReplication parameter specifies to configure and enable a DAG to use third-party replication that leverages the Exchange Third Party Replication API instead of the built-in continuous replication. After this mode is enabled, it can't be changed.

WhatIf

Optional

System.Management.Automation.SwitchParameter

The WhatIf switch instructs the command to simulate the actions that it would take on the object. By using the WhatIf switch, you can view what changes would occur without having to apply any of those changes. You don't have to specify a value with the WhatIf switch.

WitnessDirectory

Optional

Microsoft.Exchange.Data.NonRootLocalLongFullPath

The WitnessDirectory parameter specifies the name of the directory on the witness server used to store file share witness data. The directory and share should be hosted on an Exchange server other than any of the Mailbox servers in the DAG. This allows an Exchange administrator to maintain operational control over the directory. The specified directory must not be in use by any other DAGs or used for any purpose other than for the witness server. If you omit this option, the default witness directory is used.

WitnessServer

Optional

Microsoft.Exchange.Data.FileShareWitnessServerName

The WitnessServer parameter specifies the name of a server used as a quorum witness when the DAG contains an even number of members. The selected server must not be a member of the DAG that's configured to use it. If you omit the WitnessServer parameter, the task tries to automatically select a Client Access server without the Mailbox server role in the same Active Directory site as the DAG to use as the witness server.

Input Types

To see the input types that this cmdlet accepts, see Cmdlet Input and Output Types. If the Input Type field for a cmdlet is blank, the cmdlet doesn’t accept input data.

Return Types

To see the return types, which are also known as output types, that this cmdlet accepts, see Cmdlet Input and Output Types. If the Output Type field is blank, the cmdlet doesn’t return data.