Problem description
When using PasswordPass and UnsecuredJoin options or JoinReadOnly option means AD computer object has been pre-created within Active Directory prior to domain join and should not be deleted
This combination of commands creates a new computer account with a predefined name and temporary join password in a domain using an existing domain-joined computer.
https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.management/add-computer?view=powershell-5.1
Verbose logs
Current dsc resources is deleting AD computer object previously created so domain join is failing as it's expecting the computer object to exist already
DSC configuration
Computer DomainJoin
{
Name = "server"
Description = "Test Server"
DomainName = "contoso.com"
Credential = $Cred
JoinOU = "CN=Computers,DC=contoso,DC=com"
Options = @('PasswordPass','UnsecuredJoin ')
}
Suggested solution
PR #447
Operating system the target node is running
PowerShell version and build the target node is running
ComputerManagementDsc version