How to do it...

Let's see how to use the automatic reseed feature using the following steps:

  1. We'll start with configuring the DAG with the folder structure using the following command:
    Set-DatabaseAvailabilityGroup DAG '
    -AutoDagDatabasesRootFolderPath "C:\ExDbs"
    Set-DatabaseAvailabilityGroup DAG '
    -AutoDagVolumesRootFolderPath "C:\ExVols"
    Set-DatabaseAvailabilityGroup DAG '
    -AutoDagDatabaseCopiesPerVolume 1  
  1. Next, verify the changes using the Get-DatabaseAvailabilityGroup cmdlet as shown here:
    Get-DatabaseAvailabilityGroup DAG | Format-List *auto*  
  1. Create the folder structure using Explorer or the Command Prompt:
    md C:\ExDBs
    md C:\ExDBs\DB01
    md C:\ExVols
    md C:\ExVols\Volume1
    md C:\ExVols\Volume2  
  1. Verify the folder structure using ...

Get Microsoft Exchange Server 2016 PowerShell Cookbook - Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.