Skip to content

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

@mgreenegit

Description

@mgreenegit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions