Skip to content

Commit b7ad7ec

Browse files
authored
Merge pull request #936 from michaeltlombardi/docs/main/v3.1.0-reference
(DOCS) Update reference docs for v3.1.0
2 parents b6b151c + 47d308b commit b7ad7ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+2086
-333
lines changed

CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ changes since the last release, see the [diff on GitHub][unreleased].
121121
- Added support for extensions to DSC. You can now use the `dsc extension list` command to
122122
enumerate available extensions. DSC now supports a single extension capability, `discover`, which
123123
returns JSON objects indicating where to find DSC resource manifests that aren't in the `PATH` or
124-
`DSC_PATH`, as with resources installed as Appx packages.
124+
`DSC_RESOURCE_PATH`, as with resources installed as Appx packages.
125125

126126
Now when DSC performs discovery, it recursively discovers extensions and resources on the system.
127127

@@ -135,7 +135,7 @@ changes since the last release, see the [diff on GitHub][unreleased].
135135
- [#760][#760]
136136
- [#762][#762]
137137

138-
- Addes support for passing parameters to the `dsc config` commands from stdin. You can pass
138+
- Adds support for passing parameters to the `dsc config` commands from stdin. You can pass
139139
_either_ the configuration document or parameters file contents to the command from stdin, but
140140
not both. This enables securely passing sensitive parameters to DSC without writing them to a
141141
file or defining them as an environment variable.

docs/reference/cli/config/export.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ dsc config export [Options] --input <INPUT>
3131
cat <FILE> | dsc config export [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - export [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - export [Options] --input <INPUT>
44+
```
45+
3446
## Description
3547

3648
The `export` subcommand generates a configuration document that includes every instance of a set of

docs/reference/cli/config/get.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ dsc config get [Options] --input <INPUT>
3131
cat <FILE> | dsc config get [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - get [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - get [Options] --input <INPUT>
44+
```
45+
3446
## Description
3547

3648
The `get` subcommand returns the actual state of the resource instances in a configuration

docs/reference/cli/config/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,11 @@ for that parameter.
7878

7979
This option is mutually exclusive with the `--parameters` option.
8080

81+
Starting with DSC version 3.1.0, you can pass the parameters data to a subcommand over stdin. When
82+
you do, you must pass the configuration document as an input string or the path to a file on the
83+
system. You can't pass both the parameters file and the configuration document to a command from
84+
stdin.
85+
8186
For more information about defining parameters in a configuration document, see
8287
[DSC Configuration document parameter schema][06]. For more information about using parameters in
8388
configuration document, see the [parameters function reference][07].

docs/reference/cli/config/set.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,19 @@ dsc config set [Options] --input <INPUT>
3131
cat <FILE> | dsc config set [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - set [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - set [Options] --input <INPUT>
44+
```
45+
46+
3447
## Description
3548

3649
The `set` subcommand enforces the desired state of the resource instances in a configuration

docs/reference/cli/config/test.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ dsc config test [Options] --input <INPUT>
3131
cat <FILE> | dsc config test [Options] --file -
3232
```
3333

34+
### Configuration document from file with parameters from stdin
35+
36+
```sh
37+
cat <PARAMETERS_FILE> | dsc config --parameters-file - test [Options] --file <FILE>
38+
```
39+
40+
### Configuration document from option string with parameters from stdin
41+
42+
```sh
43+
cat <PARAMETERS_FILE> | dsc config --parameters-file - test [Options] --input <INPUT>
44+
```
45+
3446
## Description
3547

3648
The `test` subcommand verifies whether the resource instances in a configuration document are in

docs/reference/cli/extension/index.md

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
description: Command line reference for the 'dsc extension' command
3+
ms.date: 03/25/2025
4+
ms.topic: reference
5+
title: dsc extension
6+
---
7+
8+
# dsc extension
9+
10+
## Synopsis
11+
12+
Operations on DSC extensions.
13+
14+
## Syntax
15+
16+
```sh
17+
dsc extension [Options] <COMMAND>
18+
```
19+
20+
## Description
21+
22+
The `dsc extension` command contains a subcommand for listing DSC extensions.
23+
24+
## Commands
25+
26+
### list
27+
28+
The `list` command returns the list of available DSC extensions with an optional filter. For more
29+
information, see [dsc extension list][01].
30+
31+
### help
32+
33+
The `help` command returns help information for this command or a subcommand.
34+
35+
To get the help for a command or subcommand, use the syntax:
36+
37+
```sh
38+
dsc extension help [<SUBCOMMAND>]
39+
```
40+
41+
For example, `dsc extension help` gets the help for this command. `dsc extension help list`
42+
gets the help for the `list` subcommand.
43+
44+
You can also use the [--help](#--help) option on the command or subcommand to display the help
45+
information. For example, `dsc extension --help` or `dsc extension list --help`.
46+
47+
## Options
48+
49+
### -h, --help
50+
51+
<a id="-h"></a>
52+
<a id="--help"></a>
53+
54+
Displays the help for the current command or subcommand. When you specify this option, the
55+
application ignores all other options and arguments.
56+
57+
```yaml
58+
Type : boolean
59+
Mandatory : false
60+
LongSyntax : --help
61+
ShortSyntax : -h
62+
```
63+
64+
[01]: ./list.md

docs/reference/cli/extension/list.md

Lines changed: 180 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,180 @@
1+
---
2+
description: Command line reference for the 'dsc extension list' command
3+
ms.date: 03/25/2025
4+
ms.topic: reference
5+
title: dsc extension list
6+
---
7+
8+
# dsc extension list
9+
10+
## Synopsis
11+
12+
Retrieves the list of available DSC extensions with an optional filter.
13+
14+
## Syntax
15+
16+
```sh
17+
dsc extension list [Options] <EXTENSION_NAME>
18+
```
19+
20+
## Description
21+
22+
The `list` subcommand searches for available DSC extensions and returns their information. DSC
23+
discovers extensions by first searching the `PATH` or `DSC_RESOURCE_PATH` environment variable for
24+
`.dsc.extension.json`, `.dsc.extension.yml`, and `dsc.extension.yaml` files. For more information
25+
about the environment variables DSC uses, see [Environment variables][01]
26+
27+
DSC returns the list of discovered extensions with their implementation information and metadata. If
28+
the command includes the `EXTENSION_NAME` argument, DSC filters the list of discovered extensions
29+
before returning them. Filters are always applied after extension discovery.
30+
31+
## Examples
32+
33+
### Example 1 - List all extensions
34+
35+
Without any filters, the command returns every discovered DSC extension.
36+
37+
```sh
38+
dsc extension list
39+
```
40+
41+
```Output
42+
Type Version Capabilities Description
43+
----------------------------------------------------------------------------------------------------------
44+
Microsoft.Windows.Appx/Discover 0.1.0 d Discovers DSC resources packaged as Appx packages.
45+
```
46+
47+
### Example 2 - List a specific extension
48+
49+
When the `EXTENSION_NAME` argument doesn't include a wildcard, the command returns only the extension
50+
with the specified type name.
51+
52+
```sh
53+
dsc extension list Microsoft.Windows.Appx/Discover
54+
```
55+
56+
```Output
57+
Type Version Capabilities Description
58+
----------------------------------------------------------------------------------------------------------
59+
Microsoft.Windows.Appx/Discover 0.1.0 d Discovers DSC resources packaged as Appx packages.
60+
```
61+
62+
### Example 3 - List extensions with a matching type name
63+
64+
When the `EXTENSION_NAME` argument includes a wildcard, the command returns every extension with a
65+
matching type name.
66+
67+
```sh
68+
dsc extension list Microsoft*
69+
```
70+
71+
```Output
72+
Type Version Capabilities Description
73+
----------------------------------------------------------------------------------------------------------
74+
Microsoft.Windows.Appx/Discover 0.1.0 d Discovers DSC resources packaged as Appx packages.
75+
```
76+
77+
## Arguments
78+
79+
### EXTENSION_NAME
80+
81+
Specifies an optional filter to apply for the type names of discovered DSC extensions. The filter
82+
can include wildcards (`*`). The filter isn't case-sensitive.
83+
84+
When this argument is specified, DSC filters the results to include only extensions where the
85+
extension type name matches the filter.
86+
87+
For example, specifying the filter `Microsoft.*` returns only the extensions published by
88+
Microsoft. Specifying the filter `*Windows*` returns any extension with the string `Windows` in its
89+
name, regardless of the casing.
90+
91+
```yaml
92+
Type : string
93+
Mandatory : false
94+
```
95+
96+
## Options
97+
98+
### -o, --output-format
99+
100+
<a id="-o"></a>
101+
<a id="--output-format"></a>
102+
103+
The `--output-format` option controls which format DSC uses for the data the command returns. The
104+
available formats are:
105+
106+
- `json` to emit the data as a [JSON Line][02].
107+
- `pretty-json` to emit the data as JSON with newlines, indentation, and spaces for readability.
108+
- `yaml` to emit the data as YAML.
109+
- `table-no-truncate` to emit the data as a summary table without truncating each line to the
110+
current console width.
111+
112+
The default output format depends on whether DSC detects that the output is being redirected or
113+
captured as a variable:
114+
115+
- If the command isn't being redirected or captured, DSC displays the output as a summary table
116+
described in the [Output](#output) section of this document.
117+
- If the command output is redirected or captured, DSC emits the data as the `json` format to
118+
stdout.
119+
120+
When you use this option, DSC uses the specified format regardless of whether the command is being
121+
redirected or captured.
122+
123+
When the command isn't redirected or captured, the output in the console is formatted for improved
124+
readability. When the command isn't redirected or captured, the output includes terminal sequences
125+
for formatting.
126+
127+
```yaml
128+
Type : string
129+
Mandatory : false
130+
ValidValues : [json, pretty-json, yaml, table-no-truncate]
131+
LongSyntax : --output-format <OUTPUT_FORMAT>
132+
ShortSyntax : -o <OUTPUT_FORMAT>
133+
```
134+
135+
### -h, --help
136+
137+
<a id="-h"></a>
138+
<a id="--help"></a>
139+
140+
Displays the help for the current command or subcommand. When you specify this option, the
141+
application ignores all other options and arguments.
142+
143+
```yaml
144+
Type : boolean
145+
Mandatory : false
146+
LongSyntax : --help
147+
ShortSyntax : -h
148+
```
149+
150+
## Output
151+
152+
This command returns a formatted array containing an object for each extension that includes the
153+
extension's type, version, manifest settings, and other metadata. For more information, see
154+
[dsc extension list result schema][03].
155+
156+
If the output of the command isn't captured or redirected, it displays in the console by default as
157+
a summary table for the returned extensions. The summary table includes the following columns,
158+
displayed in the listed order:
159+
160+
- **Type** - The fully qualified type name of the extension.
161+
- **Version** - The semantic version of the extension.
162+
- **Capabilities** - A display of the extension's [capabilities][04] as flags. The capabilities are
163+
displayed in the following order, using a `-` instead of the appropriate letter if the extension
164+
doesn't have a specific capability:
165+
166+
- `d` indicates that the extension has the [discover capability][05].
167+
168+
For example, the `icrosoft.Windows.Appx/Discover` extension has the following capabilities: `d`,
169+
indicating it has the `discover` capability.
170+
- **Description** - The short description of the extension's purpose and usage.
171+
172+
For more information about the formatting of the output data, see the
173+
[--output-format option](#--output-format).
174+
175+
<!-- Link reference definitions -->
176+
[01]: ../index.md#environment-variables
177+
[02]: https://jsonlines.org/
178+
[03]: ../../schemas/outputs/extension/list.md
179+
[04]: ../../schemas/outputs/extension/list.md#capabilities
180+
[05]: ../../schemas/outputs/extension/list.md#capability-discover

0 commit comments

Comments
 (0)