Export (0) Print
Expand All
1 out of 1 rated this helpful - Rate this topic

New-DatabaseAvailabilityGroup

 

Applies to: Exchange Server 2013

Topic Last Modified: 2014-04-01

This cmdlet is available only in on-premises Exchange Server 2013.

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.

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

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.

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

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).

New-DatabaseAvailabilityGroup -Name DAG2 -DatabaseAvailabilityGroupIpAddresses 10.0.0.8

This example creates the DAG DAG3. DAG3 is configured to use CAS1 for the witness server, and a witness directory on CAS1 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).

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

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.

New-DatabaseAvailabilityGroup -Name DAG4

This example creates the DAG DAG5 without a cluster administrative access point (Windows Server 2012 R2 and later DAG members only). DAG5 is configured to use CAS1 for the witness server, and a witness directory on CAS1 of C:\DAG3.

New-DatabaseAvailabilityGroup -Name DAG5 -WitnessServer CAS1 -WitnessDirectory C:\DAG3 -DatabaseAvailabilityGroupIpAddresses ([System.Net.IPAddress])::None

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 R2, 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.

ImportantImportant:
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, unless you are creating a DAG without a cluster administrative access point, which can be done only with DAG members running Windows Server 2012 R2. You can assign static IP addresses to the DAG by using the DatabaseAvailabilityGroupIpAddresses parameter. If you omit this parameter or configure the parameter with a value of 0.0.0.0, the task attempts to use Dynamic Host Configuration Protocol (DHCP) to obtain the necessary IP addresses. If you configure the parameter with a value of 255.255.255.255, the task attempts to create a DAG without a cluster administrative access point.

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.

 

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.

DagConfiguration

Optional

Microsoft.Exchange.Configuration.Tasks.DatabaseAvailabilityGroupConfigurationIdParameter

This parameter is reserved for internal Microsoft use.

DatabaseAvailabilityGroupIpAddresses

Optional

System.Net.IPAddress[]

The DatabaseAvailabilityGroupIpAddresses parameter specifies one or more static IPv4 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 IPv4 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 also configures the DAG to use DHCP. Setting the DatabaseAvailabilityGroupIpAddresses parameter to a value of 255.255.255.255 creates a DAG without a cluster administrative access point.

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.

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.

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.

 
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.