Skip to content

win_lgpo: Support managing arbitrary registry key/value/data actions in Registry.pol #56013

@lorengordon

Description

@lorengordon

Description of Issue

At the moment, the lgpo module uses the policy name or id (plus path) to identify a distinct item in the ADML/ADMX files. We would like to use the key and valueName if we can. This is convenient because it directly indicates where in the registry the setting is configured (ultimately), and interfacing with the registry is rather easier than gpedit.msc. Also, DISA SCAP benchmarks reference the registry key/valueName in scan findings, so supporting key/valueName would make it very easy to take a scan and create/update a policy.

To pull an example from the docs:

PS>Get-ChildItem -Path C:\Windows\PolicyDefinitions -Recurse -Filter *.admx | Select-String "ShellRemoveOrderPrints"

C:\windows\PolicyDefinitions\ICM.admx:661:    <policy name="ShellRemoveOrderPrints_1" class="User" displayName="$(string.ShellRemoveOrderPrints)" explainText="$(string.ShellRemoveOrderPrints_Help)" key="Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" valueName="NoOnlinePrintsWizard">
C:\windows\PolicyDefinitions\ICM.admx:671:    <policy name="ShellRemoveOrderPrints_2" class="Machine" displayName="$(string.ShellRemoveOrderPrints)" explainText="$(string.ShellRemoveOrderPrints_Help)" key="Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" valueName="NoOnlinePrintsWizard">

This entry has 3 policy aliases today:

    policy_aliases:
        - Turn off the "Order Prints" picture task
        - ShellRemoveOrderPrints_2
        - System\Internet Communication Management\Internet Communication settings\Turn off the "Order Prints" picture task

I'm basically asking that the key and valueName from the xml entry also be supported, key="Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" valueName="NoOnlinePrintsWizard"

    policy_aliases:
        - Turn off the "Order Prints" picture task
        - ShellRemoveOrderPrints_2
        - System\Internet Communication Management\Internet Communication settings\Turn off the "Order Prints" picture task
        - Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\NoOnlinePrintsWizard

Metadata

Metadata

Assignees

Labels

Featurenew functionality including changes to functionality and code refactors, etc.Windowshelp-wantedCommunity help is needed to resolve thislgpo

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions