Skip to content

Computer: AD object should not be deleted when using PasswordPass and UnsecuredJoin options or JoinReadOnly option #446

@webalexeu

Description

@webalexeu

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

NA

PowerShell version and build the target node is running

NA

ComputerManagementDsc version

v9.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions