## Summary of the Pull Request Accumulated information from internal transition about the modules development, and reworked it to be added in dev docs. Also the dev docs intself was restructured to be more organized. New pages was verified by transition team. ## PR Checklist - [x] **Dev docs:** Added/updated --------- Co-authored-by: Zhaopeng Wang (from Dev Box) <zhaopengwang@microsoft.com> Co-authored-by: Hao Liu <liuhao3418@gmail.com> Co-authored-by: Peiyao Zhao <105847726+zhaopy536@users.noreply.github.com> Co-authored-by: Mengyuan <162882040+chenmy77@users.noreply.github.com> Co-authored-by: zhaopeng wang <33367956+wang563681252@users.noreply.github.com> Co-authored-by: Jaylyn Barbee <51131738+Jaylyn-Barbee@users.noreply.github.com>
2.1 KiB
Group Policy Integration
PowerToys settings can be controlled and enforced via Group Policy. This document describes how Group Policy integration is implemented in the settings system.
Overview
Group Policy settings for PowerToys allow administrators to:
- Enable or disable PowerToys entirely
- Control which modules are available
- Configure specific settings for individual modules
- Enforce settings across an organization
Implementation Details
When a setting is controlled by Group Policy:
- The UI shows the setting as locked (disabled)
- The module checks GPO settings before applying user settings
- GPO settings take precedence over user settings
Group Policy Settings Detection
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;
}
UI Indication for Managed Settings
When a setting is managed by Group Policy, the UI indicates this to the user:
- Controls are disabled (grayed out)
- A tooltip indicates the setting is managed by policy
- The actual policy value is displayed
Testing Group Policy Settings
To test Group Policy integration:
- Create a test GPO using the PowerToys ADMX template
- Apply settings in the Group Policy Editor
- Verify that the settings UI correctly reflects the policy settings
- Verify that the modules honor the policy settings
GPO Settings vs. User Settings
The precedence order for settings is:
- Group Policy settings (highest priority)
- User settings (lower priority)
- Default settings (lowest priority)
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.