win_psDscAdapter and psDscAdapter PScredentials fix for passing username and password#1308
Conversation
…nvert to System.Management.Automation.PSCredentia
|
@microsoft-github-policy-service agree
@microsoft-github-policy-service agree |
|
@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? |
|
Yes I working o it |
…rt to System.Management.Automation.PSCredentia - code optimalization remove unused function
…tem.Management.Automation.PSCredential
…t to System.Management.Automation.PSCredential
…t to System.Management.Automation.PSCredential - if change to recognize user information
|
@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 |
|
@mimachniak - can it be tested inside the |
I will add today, I added yaml files for running test |
…alid secure object
I added unit test and validation in file in powershellgroup.config.tests.ps1 |
|
I added test for 5.1 as well |
|
@mimachniak Thanks for adding the test resource, but there isn't a Pester test using it yet? |
|
@SteveL-MSFT I will add test today |
…sc for script resources
… parameters - credentials
|
@SteveL-MSFT can you approve marge ? |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 12 out of 12 changed files in this pull request and generated 18 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...wershell/Tests/TestScriptBaseDSC/DSCResources/CredentialValidation/CredentialValidation.psm1
Show resolved
Hide resolved
adapters/powershell/Tests/class_ps_resources_secret.parameters.yaml
Outdated
Show resolved
Hide resolved
….yaml Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntialValidation/CredentialValidation.psm1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…ntialValidation/CredentialValidation.psm1 Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…th 'Username' and 'Password' properties
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot open a new pull request to apply changes based on the comments in this thread |
|
@SteveL-MSFT - all copilot suggestion resolved but this warring don't appear in .12 version so test cannot add this Validating deprecation warning for adapter 'Microsoft.Adapter/WindowsPowerShell' |
|
@SteveL-MSFT I update branch because linux build faild I see you add some fix, please allow to run |
PR Summary
PR Context
Fix using ScriptBased DSC resources when is reguired to use parameters with Get-Credentials