GPRegistryPolicyDsc icon indicating copy to clipboard operation
GPRegistryPolicyDsc copied to clipboard

RegistryPolifyFile always returns Compliant if Key includes "HKEY_LOCAL_MACHINE\"

Open mgreenegit opened this issue 4 years ago • 0 comments

Details of the scenario you tried and the problem that is occurring

When testing, if the Key property contained 'HKEY_LOCAL_MACHINE' in the string, the resource always returned compliant.

RegistryPolicyFile 'AllowInputPersonalization' { Ensure = 'Present' Key = 'HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\InputPersonalization' TargetType = 'ComputerConfiguration' ValueName = 'AllowInputPersonalization' ValueType = 'DWord' ValueData = '0' }

Although the value of 'Key' should not contain this additional text, it was unexpected for TEST to return 'Compliant'.

Suggested solution to the issue

It's possible a string is matching in an unexpected way?

The operating system the target node is running

2016

Version and build of PowerShell the target node is running

7.1 (guest config)

Version of the DSC module that was used

latest

mgreenegit avatar Nov 17 '21 15:11 mgreenegit