Skip to content

Conversation

@mimachniak
Copy link

PR Summary

  • I change creating object System.Management.Automation.PSCredential for ScriptBase resources base on Get-Credential parameters
  • Added dsc.yaml test file for ScriptBased DSC

PR Context

Fix using ScriptBased DSC resources when is reguired to use parameters with Get-Credentials

@mimachniak
Copy link
Author

@microsoft-github-policy-service agree

@mimachniak please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@Gijsreyn
Copy link
Contributor

@mimachniak - as I have already spoken with you on socials, is this perhaps also possible for class-based DSC resources (both in the 5.1 and 7.0 adapter)? Can you also include a testcase that covers this change?

@mimachniak
Copy link
Author

Yes I working o it

mimachniak and others added 3 commits December 17, 2025 16:26
…rt to System.Management.Automation.PSCredentia - code optimalization remove unused function
@mimachniak mimachniak changed the title Win ps dsc adapter ps credentials fix script dsc win_psDscAdapter and psDscAdapter PScredentials fix for passing username and password Dec 18, 2025
…t to System.Management.Automation.PSCredential
…t to System.Management.Automation.PSCredential - if change to recognize user information
@mimachniak
Copy link
Author

@Gijsreyn , @SteveL-MSFT - I added in test folder yaml's that are using TestClass for validation using PSCredentials, I tested on version 5.1 and 7 of PowerShell

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants