Files
PowerToys/doc/dsc/overview.md
Gijs Reijn 3b6453c932 Improve DSC documentation (#42554)
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request

This documentation enhances the DSC documentation by incorporating
reference documents and providing examples.

Closes #42552.

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist

- [x] Closes: #xxx
- [ ] **Communication:** I've discussed this with core contributors
already. If the work hasn't been agreed, this work might be rejected
- [ ] **Tests:** Added/updated and all pass
- [ ] **Localization:** All end-user-facing strings can be localized
- [ ] **Dev docs:** Added/updated
- [ ] **New binaries:** Added on the required places
- [ ] [JSON for
signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json)
for new binaries
- [ ] [WXS for
installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs)
for new binaries and localization folder
- [ ] [YML for CI
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml)
for new test projects
- [ ] [YML for signed
pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml)
- [ ] **Documentation updated:** If checked, please file a pull request
on [our docs
repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys)
and link it here: #xxx

<!-- Provide a more detailed description of the PR, other things fixed,
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

---------

Co-authored-by: Niels Laute <niels.laute@live.nl>
2026-04-01 16:56:40 +08:00

8.8 KiB

description, ms.date, ms.topic, title
description ms.date ms.topic title
Overview of PowerToys Desired State Configuration (DSC) support 10/18/2025 overview PowerToys DSC Overview

PowerToys DSC Overview

Synopsis

PowerToys supports Desired State Configuration (DSC) v3 for declarative configuration management of PowerToys settings.

Description

PowerToys includes Microsoft Desired State Configuration (DSC) support through the PowerToys.DSC.exe command-line tool, enabling you to:

  • Declare and enforce desired configuration states for PowerToys utilities.
  • Automate PowerToys configuration across multiple systems.
  • Integrate PowerToys configuration with WinGet and other DSC-compatible tools.
  • Version control your PowerToys settings as code.

The PowerToys DSC implementation provides a settings resource that manages configuration for all PowerToys utilities (modules). Each utility can be configured independently, allowing granular control over your PowerToys environment.

Usage methods

PowerToys DSC can be used in three ways:

1. Direct execution with PowerToys.DSC.exe

Execute DSC operations directly using the PowerToys.DSC.exe command-line tool:

# Get current settings for a module
PowerToys.DSC.exe get --resource 'settings' --module Awake

# Set settings for a module
$input = '{"settings":{...}}'
PowerToys.DSC.exe set --resource 'settings' --module Awake --input $input

# Test if settings match desired state
PowerToys.DSC.exe test --resource 'settings' --module Awake --input $input

For detailed information, see PowerToys.DSC.exe command reference.

2. Microsoft Desired State Configuration (DSC)

Use PowerToys DSC resources in standard DSC configuration documents:

# powertoys-config.dsc.yaml
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
  - name: Configure Awake
    type: Microsoft.PowerToys/AwakeSettings
    properties:
      settings:
        properties:
          keepDisplayOn: true
          mode: 1
        name: Awake
        version: 0.0.1

3. WinGet Configuration

Integrate PowerToys configuration with WinGet package installation:

# winget-powertoys.yaml
$schema: https://raw.githubusercontent.com/PowerShell/DSC/main/schemas/2023/08/config/document.json
metadata:
  winget:
    processor: dscv3
resources:
  - name: Install PowerToys
    type: Microsoft.WinGet.DSC/WinGetPackage
    properties:
      id: Microsoft.PowerToys
      source: winget
  
  - name: Configure FancyZones
    type: Microsoft.PowerToys/FancyZonesSettings
    properties:
      settings:
        properties:
          fancyzones_shiftDrag: true
          fancyzones_mouseSwitch: true
        name: FancyZones
        version: 1.0

Available resources

PowerToys DSC provides the following resource:

Resource Description
settings Manages configuration for PowerToys utility modules.

For detailed information about the settings resource, see Settings Resource Reference.

Available modules

The settings resource supports configuration for the following PowerToys utilities:

Module Description Documentation
App General PowerToys application settings. App module
AdvancedPaste Advanced clipboard operations. AdvancedPaste module
AlwaysOnTop Pin windows to stay on top. AlwaysOnTop module
Awake Keep computer awake. Awake module
ColorPicker System-wide color picker utility. ColorPicker module
CropAndLock Crop and lock portions of windows. CropAndLock module
EnvironmentVariables Manage environment variables. EnvironmentVariables module
FancyZones Window layout manager. FancyZones module
FileLocksmith Identify what's locking files. FileLocksmith module
FindMyMouse Locate your mouse cursor. FindMyMouse module
Hosts Quick hosts file editor. Hosts module
ImageResizer Resize images from context menu. ImageResizer module
KeyboardManager Remap keys and create shortcuts. KeyboardManager module
MeasureTool Measure pixels on screen. MeasureTool module
MouseHighlighter Highlight mouse cursor. MouseHighlighter module
MouseJump Jump across large or multiple displays. MouseJump module
MousePointerCrosshairs Display crosshairs centered on mouse. MousePointerCrosshairs module
Peek Quick file previewer. Peek module
PowerAccent Quick accent character selector. PowerAccent module
PowerOCR Extract text from images. PowerOCR module
PowerRename Bulk rename files. PowerRename module
RegistryPreview Visualize and edit registry files. RegistryPreview module
ShortcutGuide Display keyboard shortcuts. ShortcutGuide module
Workspaces Save and restore application sets. Workspaces module
ZoomIt Screen zoom and annotation tool. ZoomIt module

Common operations

List all supported modules

PowerToys.DSC.exe modules --resource 'settings'

Get current configuration

# Get configuration for a specific module.
PowerToys.DSC.exe get --resource 'settings' --module FancyZones

# Export configuration (identical to get).
PowerToys.DSC.exe export --resource 'settings' --module FancyZones

Apply configuration

# Set configuration for a module.
$input = '{"settings":{...}}'
PowerToys.DSC.exe set --resource 'settings' --module FancyZones --input $input

Validate configuration

# Test if current state matches desired state.
$input = '{"settings":{...}}'
PowerToys.DSC.exe test --resource 'settings' --module FancyZones --input $input

Generate schema

# Get JSON schema for a module's settings.
PowerToys.DSC.exe schema --resource 'settings' --module FancyZones

Generate DSC manifest

# Generate manifest for a specific module.
$outputDir = "C:\manifests"
PowerToys.DSC.exe manifest --resource 'settings' --module FancyZones `
  --outputDir $outputDir

# Generate manifests for all modules.
PowerToys.DSC.exe manifest --resource 'settings' --outputDir $outputDir

Examples

For complete examples, see:

See also