dsccommunity / dsccommunity/ActiveDirectoryDsc

ActiveDirectoryDsc: Use New-CimCredentialInstance for credential objects

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

Nobody has claimed this yet.

enhancement help wanted
Dominant language
PowerShell
Stars
388
Forks
141
PR merge metrics
No merged PRs in 30d

Description

We should use the same pattern as in xADDomainTrust to return the credential objects from Get-TargetResource.

https://github.com/PowerShell/xActiveDirectory/blob/dd53b43a46a6e7ddd101a0b7f393af0d377b100e/DSCResources/MSFT_xADDomainTrust/MSFT_xADDomainTrust.psm1#L60-L66

The helper function New-CimCredentialInstance will create a MSFT_Credential CIM instance credential object without a password that can be used to return the actual username used from GetTargetResource.

This should be used for all resource that have a MSFT_Credential instance in the schema.mof.

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 MSFT_xADDomainTrust/MSFT_xADDomainTrust.psm1 around the linked Get-TargetResource implementation and review how New-CimCredentialInstance creates the credential object. Find each resource whose schema.mof contains an MSFT_Credential instance, apply the same return pattern, and verify that Get-TargetResource exposes the username without a password for all of them.

Written by the indexing model from the issue text.

Assessment

Tech stack
powershell
Domain
devops, infrastructure
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.