dsccommunity / dsccommunity/ComputerManagementDsc

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

Open
#446 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PowerShell
Stars
338
Forks
80
PR merge metrics
No merged PRs in 30d

Description

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 https://github.com/dsccommunity/ComputerManagementDsc/pull/447

Operating system the target node is running
NA
PowerShell version and build the target node is running
NA
ComputerManagementDsc version
v9.2.0

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Computer DomainJoin resource and review pull request #447, which is the suggested solution for this issue. Check how PasswordPass, UnsecuredJoin, and JoinReadOnly are handled when an AD computer object already exists; done means the existing object is preserved so the domain join can complete.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.