Adding Multiple Dag-members to New DAG using DSC (PowerShell)

Hi All,
currently i am working on Exchange Server deployment using PowerShell DSC (Parallel multiple Exchange 2019 servers deployments for creation of data center)
Part-1 Exchange Server 2019 Prerequisites Installation Completed Using DSC(PowerShell)
Part-2 Exchange Server Installation and Creation of DB Mount points with Disks also completed using DSC (PowerShell)
Part-3 Need to add the exchange servers to the DAG (8 Nodes) as DAG members,
but now facing an issue where the first node is joining the DAG but the second node thinks the DAG is up and is also trying to join the DAG which is creating multiple clusters with single node in it. 8 servers with 8 clusters once the AD replication starts the problem starts due to multiple clusters.

Please suggest if any suggestions to fix this issue using PowerShell, so I can start working on the same.

how are you trying to do step 3 ? using DSC ?

Can you share the code or a sample code here for the folks to understand the problem better ?

Hi kvprasoon

Sorry for the delay in response.


Due to Compliance issue, unable to share the actual code, apologies.

But i am using the DSC resource example available in the below URL

compared to this available DSC resource code to main is in my DSC script the servers are being fetched from csv input file.

Using Inline script i am parallel creating the mof files on multiple servers and doing the installations.

please let me know if any further clarification required.