This example creates a DAG named DAG1 that is configured to use the witness server EXHUB1 and the local directory C:\DAG1. DAG1 is also configured to use DHCP for the DAG's IP addresses.
New-DatabaseAvailabilityGroup -Name DAG1 -WitnessServer EXHUB1 -WitnessDirectory C:\DAG1