doc/devdocs/core/settings/gpo-integration.md
PowerToys settings can be controlled and enforced via Group Policy. This document describes how Group Policy integration is implemented in the settings system.
Group Policy settings for PowerToys allow administrators to:
When a setting is controlled by Group Policy:
The settings UI checks for Group Policy settings during initialization:
// Example code for checking if a setting is controlled by GPO
bool isControlledByPolicy = RegistryHelper.GetGPOValue("PolicyKeyPath", "PolicyValueName", out object value);
if (isControlledByPolicy)
{
// Use the policy value and disable UI controls
setting.IsEnabled = false;
setting.Value = (bool)value;
}
When a setting is managed by Group Policy, the UI indicates this to the user:
To test Group Policy integration:
The precedence order for settings is:
When a setting is controlled by Group Policy, attempts to modify it through the settings UI or programmatically will not persist, as the policy value will always take precedence.
For more information on PowerToys Group Policy implementation, see the GPO Implementation documentation.