dsccommunity / FailoverClusterDsc

This module contains DSC resources for deployment and configuration of Windows Server Failover Cluster.
MIT License
60 stars 54 forks source link

xCluster: Must provide DomainAdministratorCredential #164

Closed Woogyz closed 3 years ago

Woogyz commented 6 years ago

I ran into an issue when utilizing this resource where I didn't want to provide a DA credential. In my environment, we utilize machine identities to ACL most of our resources so we can avoid using passwords in 99.9% of situations. Unfortunately, this resource doesn't support this. Suggested fixes:

Changed the "DomainAdministratorCredential" property in the schema to "write" (was required). Changed the "DomainAdministratorCredential" parameter in the resource to "Mandatory = $false". Wrapped the Set-ImpersonateAs function in an if statement to check for the "DomainAdministratorCredential" key exists in $PSBoundParameters.