Add-DbaComputerCertificate - handle multiple flags for NonExportable keys#10176
Add-DbaComputerCertificate - handle multiple flags for NonExportable keys#10176potatoqualitee merged 6 commits intodataplat:developmentfrom
Conversation
…ng to LocalMachine store
…ography.X509Certificates.X509KeyStorageFlags
|
Thank you 🙌🏼 I will merge once tests pass. Changes look reasonable! |
Code ReviewThanks for the PR! This addresses a real bug where What the fix doesThe original logic only added The fix unconditionally appends the correct store flag, which is the right intent. Bug: Leading comma when no other flags are presentWhen That leading comma is passed directly to A safer approach would be to collect the other flags into an array, then join them with the store flag, filtering out any empty entries before joining. Separate pre-existing issue: local import ignores
|
| Assessment | |
|---|---|
| Core intent | Correct — always including the store flag is the right fix |
| Leading comma edge case | Bug — -Flag NonExportable alone produces ",MachineKeySet" |
| Hardcoded flags on local import | Pre-existing, but worth a clarifying comment |
| Verbose message ordering | Minor regression in debug output |
| No tests included | Would be helpful given the flag-combination logic |
The core fix is on the right track but the leading-comma edge case should be addressed before merging.
|
Thank you 🙏🏼 |
Type of Change
Invoke-ManualPester)Purpose
Approach
Commands to test
Screenshots
Learning