dsc command

November 7, 2025 ยท View on GitHub

The dsc command provides access to Microsoft DSC (Desired State Configuration) resource operations. Use this command to get, set, test, and export resource states from the command line.

Syntax

wingetstudio dsc <operation> [options]

Operations

The dsc command supports the following resource operations:

OperationDescription
getRetrieve the current state of a resource
setConfigure a resource to match desired state
testTest whether a resource is in desired state
exportExport all instances of a resource
schemaDisplay the JSON schema for a resource
manifestDisplay the resource manifest

Options

OptionDescription
-?, -h, --helpShow help and usage information

Available resources

The following DSC resources are provided by WinGet Studio:

ResourceTypeOperationsReference
settingsMicrosoft.WinGetStudio/Settingsget, set, test, export, schema, manifestSettings

Examples

Get resource state

Retrieve the current state of the Settings resource:

wingetstudio dsc get --resource settings

Output:

{
  "settings": {
    "theme": "Default",
    "telemetry": {
      "disable": false
    }
  }
}

Set resource state

Configure the Settings resource with desired state:

wingetstudio dsc set --resource settings --input '{
  "settings": {
    "theme": "Dark",
    "telemetry": {
      "disable": true
    }
  }
}'

Output:

{
  "settings": {
    "theme": "Dark",
    "telemetry": {
      "disable": true
    }
  }
}

Test resource state

Test whether the Settings resource is in desired state:

wingetstudio dsc test --resource settings --input '{
  "settings": {
    "theme": "Dark",
    "telemetry": {
      "disable": false
    }
  }
}'

Output:

{
  "settings": {
    "theme": "Dark",
    "telemetry": {
      "disable": true
    }
  },
  "_inDesiredState": false
}

The _inDesiredState property indicates whether the current state matches the desired state.

Export resource configuration

Export all instances of the Settings resource:

wingetstudio dsc export --resource settings

Output:

{
  "settings": {
    "theme": "Default",
    "telemetry": {
      "disable": false
    }
  }
}

Display resource schema

View the JSON schema for the Settings resource:

wingetstudio dsc schema --resource settings

Returns the complete JSON schema defining the resource's properties and structure.

Display resource manifest

View the resource manifest:

wingetstudio dsc manifest --resource settings

Returns the DSC resource manifest including supported operations and adapter information.

See also