dsccommunity / GPRegistryPolicyDsc

DSC resources used to apply and manage local group policies by modifying the respective .pol file.
MIT License
21 stars 7 forks source link

RegistryPolifyFile always returns Compliant if Key includes "HKEY_LOCAL_MACHINE\" #29

Open mgreenegit opened 2 years ago

mgreenegit commented 2 years ago

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