You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Details of the scenario you tried and the problem that is occurring
When setting a registry policy file value that is a MultiString with multiple entries, all items end up in the same entry separated by spaces.
For example, when setting the group policy "ComputerConfiguration\Administrative Templates\Network\SSL ConfigurationSettings\ECC Curve Order" (registry key "HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002:EccCurves" to @('curve25519', 'NistP384', NistP256'), the three values are saved in one string as 'curve25519 NistP384 NistP256'.
The fault can be found in New-GPRegistrySettingsEntry (
) where the ValueData array is implicitly cast to a string before being passed to Unicode.GetBytes. The array string separates the values with a space, not a null character as is needed.
Verbose logs showing the problem
N/A
Suggested solution to the issue
New-GPRegistrySettingsEntry should join the values with a null character before passing to Unicode.GetBytes
Details of the scenario you tried and the problem that is occurring
When setting a registry policy file value that is a MultiString with multiple entries, all items end up in the same entry separated by spaces.
For example, when setting the group policy "ComputerConfiguration\Administrative Templates\Network\SSL ConfigurationSettings\ECC Curve Order" (registry key "HKLM:\SOFTWARE\Policies\Microsoft\Cryptography\Configuration\SSL\00010002:EccCurves" to @('curve25519', 'NistP384', NistP256'), the three values are saved in one string as 'curve25519 NistP384 NistP256'.
The fault can be found in New-GPRegistrySettingsEntry (
GPRegistryPolicyDsc/source/Modules/GPRegistryPolicyFileParser/GPRegistryPolicyFileParser.psm1
Line 310 in 3f0c234
Verbose logs showing the problem
N/A
Suggested solution to the issue
New-GPRegistrySettingsEntry should join the values with a null character before passing to Unicode.GetBytes
as in
Similarly Format-MultiStringValue should not split on a space.
The DSC configuration that is used to reproduce the issue (as detailed as possible)
This can be reproduced using Invoke-DscResource
The operating system the target node is running
Version and build of PowerShell the target node is running
Version of the DSC module that was used
The text was updated successfully, but these errors were encountered: