If a cluster exists with a cluster name different to the name of the cluster computer object this resource will fail to correctly process the configuration. For example if the cluster name is longer than 15 characters then the computer object will be a shortened version of the name.
This line enumerates clusters in Active Directory, so looks for the Computer Object name, rather than connecting direct to the cluster.
https://github.com/dsccommunity/xFailOverCluster/blob/f4c289ae2e09d49c0a69bb081ab55f27c3cdd69e/source/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L337
This line then tries to connect directly to the cluster to list the cluster nodes, but this requires the clusters full name, not the name of the computer object.
https://github.com/dsccommunity/xFailOverCluster/blob/f4c289ae2e09d49c0a69bb081ab55f27c3cdd69e/source/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L347
I'm not sure what the best fix is here?
Line 337 makes sense, as we want to check that there isn't an existing object in active directory, but then we aren't checking the connection to the cluster prior to asking for the nodes.
If a cluster exists with a cluster name different to the name of the cluster computer object this resource will fail to correctly process the configuration. For example if the cluster name is longer than 15 characters then the computer object will be a shortened version of the name.
This line enumerates clusters in Active Directory, so looks for the Computer Object name, rather than connecting direct to the cluster.
https://github.com/dsccommunity/xFailOverCluster/blob/f4c289ae2e09d49c0a69bb081ab55f27c3cdd69e/source/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L337
This line then tries to connect directly to the cluster to list the cluster nodes, but this requires the clusters full name, not the name of the computer object.
https://github.com/dsccommunity/xFailOverCluster/blob/f4c289ae2e09d49c0a69bb081ab55f27c3cdd69e/source/DSCResources/MSFT_xCluster/MSFT_xCluster.psm1#L347
I'm not sure what the best fix is here?
Line 337 makes sense, as we want to check that there isn't an existing object in active directory, but then we aren't checking the connection to the cluster prior to asking for the nodes.