Creating a Database Availability Group

The initial setup and configuration of a Database Availability Group (DAG) is done using a single cmdlet named New-DatabaseAvailabilityGroup . In this recipe, we'll take a look at how you can automate the creation of a DAG using the Exchange Management Shell.

How to do it...

To create a DAG, use the New-DatabaseAvailabilityGroup cmdlet :

New-DatabaseAvailabilityGroup -Name DAG `
-WitnessServer HC1 `
-WitnessDirectory C:\FSW `

The previous command creates a new Database Availability Group named DAG. The file share witness server is set to a hub transport server named HC1, and the path for the directory is also specified, along with an IP address that will be ...

Get Microsoft Exchange 2010 PowerShell Cookbook now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.