11---
22description : JSON schema reference for the 'adapter' property in a DSC Resource manifest
3- ms.date : 07/03/2025
3+ ms.date : 09/01/2026
44ms.topic : reference
55title : DSC Resource manifest adapter property schema reference
66---
@@ -23,7 +23,9 @@ Type: object
2323
2424DSC Resource Adapters must define the ` adapter` property in their manifest. This property
2525identifies the resource as an adapter and defines how DSC can call the adapter to get the resources
26- the adapter supports and how to pass resource instances to the adapter.
26+ the adapter supports and how to pass resource instances to the adapter. When a manifest defines
27+ this property and doesn't define the [kind][01] property, DSC infers the resource kind as
28+ ` adapter` .
2729
2830# # Examples
2931
@@ -39,64 +41,114 @@ This example is from the `Microsoft.DSC/PowerShell` DSC Resource Adapter.
3941 "-NoLogo",
4042 "-NonInteractive",
4143 "-NoProfile",
44+ "-ExecutionPolicy",
45+ "Bypass",
4246 "-Command",
43- "./powershell.resource.ps1 List"
47+ "./psDscAdapter/ powershell.resource.ps1 List"
4448 ]
45- },
46- "config ": "full"
47- },
49+ },
50+ "inputKind ": "full"
51+ }
4852` ` `
4953
50- The manifest sets `config ` to `full`, indicating that the adapter expects a JSON blob representing
51- the full and unprocessed configuration from `stdin`.
54+ The manifest sets `inputKind ` to `full`, indicating that the adapter expects a JSON blob
55+ representing the full and unprocessed configuration from `stdin`.
5256
5357It defines `list.executable` as `pwsh`. The arguments defined in `list.args` ensure that DSC runs
5458PowerShell :
5559
5660- Without the logo banner
5761- In non-interactive mode
5862- Without loading any profile scripts
59- - To invoke the `powershell.resource.ps1` script in the same folder as the `dsc` command and
60- pass the `List` argument.
63+ - With the execution policy set to `Bypass`
64+ - To invoke the `powershell.resource.ps1` script in the `psDscAdapter` folder next to the manifest
65+ and pass the `List` argument.
6166
6267With this definition, DSC calls the `list` method for this adapter by running :
6368
6469` ` ` sh
65- pwsh -NoLogo -NonInteractive -NoProfile -Command "./powershellgroup.resource.ps1 List"
70+ pwsh -NoLogo -NonInteractive -NoProfile -ExecutionPolicy Bypass \
71+ -Command "./psDscAdapter/powershell.resource.ps1 List"
6672` ` `
6773
68- # # Required Properties
74+ # ## Example 2 - Microsoft.Adapter/PowerShell
75+
76+ This example is from the `Microsoft.Adapter/PowerShell` DSC Resource Adapter.
77+
78+ ` ` ` json
79+ "adapter": {
80+ "list": {
81+ "executable": "pwsh",
82+ "args": [
83+ "-NoLogo",
84+ "-NonInteractive",
85+ "-NoProfile",
86+ "-ExecutionPolicy",
87+ "Bypass",
88+ "-Command",
89+ "./psDscAdapter/powershell.resource.ps1",
90+ "List",
91+ "-ResourceType",
92+ "Single"
93+ ]
94+ },
95+ "inputKind": "single"
96+ }
97+ ` ` `
98+
99+ The manifest sets `inputKind` to `single`, indicating that DSC should invoke the adapter for one
100+ adapted resource instance at a time. The adapter's `get`, `set`, `test`, and `export` definitions
101+ use the [resource type argument][02] and [resource path argument][03] to identify which adapted
102+ resource to invoke.
103+
104+ # # Required properties
69105
70106The `adapter` definition must include these properties :
71107
72- - [config](#config)
73- - [list](#list)
108+ - [inputKind](#inputkind)
74109
75110# # Properties
76111
77- # ## config
112+ # ## inputKind
78113
79- The `config ` property defines how the adapter expects to receive resource configurations. The
114+ The `inputKind ` property defines how the adapter expects to receive resource configurations. The
80115value must be one of the following options :
81116
82117- ` full` - Indicates that the adapter expects a JSON blob containing the full and unprocessed
83- configuration as a single JSON blob over `stdin`.
118+ configuration as a single JSON blob over `stdin`. DSC adds a `metadata` property with the
119+ ` Microsoft.DSC.context` value set to `configuration` to the input so the adapter can distinguish
120+ a full configuration from a single resource instance.
84121- ` sequence` - Indicates that the adapter expects each resource's configuration as a
85- [JSON Line][01] over `stdin`.
122+ [JSON Line][04] over `stdin`.
123+ - ` single` - Indicates that the adapter expects a single adapted resource instance. DSC invokes
124+ the adapter's operation commands directly for each adapted resource instance and passes the
125+ instance properties as the input for the command. Use the [resource type argument][02],
126+ [resource path argument][03], [resource version argument][05], and
127+ [adapted content argument][06] in the operation definitions to tell the adapter which adapted
128+ resource to invoke.
129+
130+ Prior to DSC version 3.2.0, this property was named `config`. DSC still accepts the `config` name
131+ for backward compatibility, but new manifests should use `inputKind`.
86132
87133` ` ` yaml
88134Type: string
89- ValidValues: [full, sequence]
135+ Required: true
136+ ValidValues: [full, sequence, single]
90137` ` `
91138
92139# ## list
93140
94141The `list` property defines how to call the adapter to list the resources it supports. The value
95- of this property must be an object and define the `executable` sub-property.
142+ of this property must be an object and define the `executable` sub-property. For more information
143+ about the expected output, see [DSC resource list operation stdout schema reference][07].
144+
145+ When this property isn't defined, DSC can't discover the adapter's resources by invoking the
146+ adapter. Users can still define adapted resources for the adapter with adapted resource manifests
147+ that specify the adapter with their `requireAdapter` property.
96148
97149` ` ` yaml
98150Type: object
99- Required: true
151+ Required: false
100152RequiredProperties: [executable]
101153` ` `
102154
@@ -115,12 +167,21 @@ Required: true
115167# ### args
116168
117169The `args` sub-property defines an array of strings to pass as arguments to the command. DSC passes
118- the arguments to the command in the order they're specified.
170+ the arguments to the command in the order they're specified. Unlike the `args` property for the
171+ operation methods, this array only accepts strings.
119172
120173` ` ` yaml
121- Type: array
122- Required: false
123- Default: []
174+ Type: array
175+ Required: false
176+ Default: []
177+ ItemsType: string
124178` ` `
125179
126- [01] : https://jsonlines.org/
180+ <!-- Link reference definitions -->
181+ [01] : root.md#kind
182+ [02] : get.md#resource-type-argument
183+ [03] : get.md#resource-path-argument
184+ [04] : https://jsonlines.org/
185+ [05] : get.md#resource-version-argument
186+ [06] : get.md#adapted-content-argument
187+ [07] : ../stdout/list.md
0 commit comments