Skip to content

Commit de65bee

Browse files
(DOCS) Sync updates from docs review on Learn platform
1 parent 0cc4dff commit de65bee

Some content is hidden

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

66 files changed

+858
-628
lines changed

docs/concepts/configuration-documents/index.md docs/concepts/configuration-documents/overview.md

+25-19
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
---
22
description: >-
33
DSC configuration documents are YAML or JSON data files that define the desired state of a system
4-
declaratively. They are used to retrieve, validate, and enforce the state of multiple resource
4+
declaratively. They're used to retrieve, validate, and enforce the state of multiple resource
55
instances.
6-
ms.date: 03/18/2025
6+
ms.date: 03/25/2025
77
title: DSC configuration documents
88
---
99

@@ -28,7 +28,7 @@ Configuration documents are YAML or JSON files that contain a single object. The
2828
properties define how DSC processes the document. The top-level properties for a document are:
2929

3030
- `$schema` (required) - Defines the URI for the JSON Schema the document adheres to. DSC
31-
uses this to know how to validate and interpret the document.
31+
uses this URI to know how to validate and interpret the document.
3232
- `resources` (required) - Defines the collection of resource instances the document manages.
3333
- `metadata` (optional) - Defines an arbitrary set of annotations for the document. Except for
3434
metadata within the `Microsoft.DSC` property, DSC doesn't validate this data or use it directly.
@@ -38,11 +38,11 @@ properties define how DSC processes the document. The top-level properties for a
3838

3939
DSC applies validation to the `Microsoft.DSC` property. For more information, see the
4040
[DSC Configuration document metadata schema][02] reference.
41-
- `parameters` (optional) - Defines a set of runtime options for the configuration. Parameters can
42-
be referenced by resource instances to reduce duplicate definitions or enable dynamic values.
41+
- `parameters` (optional) - Defines a set of runtime options for the configuration. Resource
42+
instances can reference parameters to reduce duplicate definitions or enable dynamic values.
4343
Parameters can have default values and can be set on any configuration operation.
44-
- `variables` (optional) - Defines a set of reusable values for the configuration. Variables can be
45-
referenced by resource instances to reduce duplicate definitions.
44+
- `variables` (optional) - Defines a set of reusable values for the configuration. Resource
45+
instances can reference variables to reduce duplicate definitions.
4646

4747
## Defining a configuration document
4848

@@ -101,9 +101,11 @@ incompatible state for the instance on every run.
101101
## Getting the current state of a configuration
102102

103103
The `dsc config get` command retrieves the current state of the resource instances defined in a
104-
configuration document. DSC also collects any message emitted by the resources during the
105-
operation, indicates whether any of the resources raised an error, and provides metadata about the
106-
operation as a whole and for each resource instance.
104+
configuration document. When you use this command, DSC also:
105+
106+
- Collects any message emitted by the resources during the operation.
107+
- Indicates whether any of the resources raised an error.
108+
- Provides metadata about the operation as a whole and for each resource instance.
107109

108110
```sh
109111
dsc config get --file ./example.config.dsc.yaml
@@ -143,9 +145,11 @@ state. The result for each instance includes:
143145
- Whether the instance is in the desired state.
144146
- The list of properties that are out of the desired state, if any.
145147

146-
DSC also collects any message emitted by the resources during the operation, indicates whether any
147-
of the resources raised an error, and provides metadata about the operation as a whole and for each
148-
resource instance.
148+
When you use this command, DSC also:
149+
150+
- Collects any message emitted by the resources during the operation.
151+
- Indicates whether any of the resources raised an error.
152+
- Provides metadata about the operation as a whole and for each resource instance.
149153

150154
```sh
151155
dsc config test --file /example.config.dsc.yaml
@@ -194,9 +198,11 @@ their desired state. The result for each instance includes:
194198
- The state of the instance after the operation.
195199
- Which properties the operation changed, if any.
196200

197-
DSC also collects any message emitted by the resources during the operation, indicates whether any
198-
of the resources raised an error, and provides metadata about the operation as a whole and for each
199-
resource instance.
201+
When you use this command, DSC also:
202+
203+
- Collects any message emitted by the resources during the operation.
204+
- Indicates whether any of the resources raised an error.
205+
- Provides metadata about the operation as a whole and for each resource instance.
200206

201207
```sh
202208
dsc config set --file ./example.config.dsc.yaml
@@ -241,9 +247,9 @@ hadErrors: false
241247
- [DSC Configuration document schema reference][05]
242248
- [Command line reference for the 'dsc config' command][06]
243249

244-
[01]: ../resources/index.md.md
250+
[01]: ../resources/overview.md
245251
[02]: ../../reference/schemas/config/metadata.md#microsoftdsc
246252
[03]: ../../reference/schemas/config/document.md
247-
[04]: ../resources/index.md#resource-type-names
253+
[04]: ../resources/overview.md#resource-type-names
248254
[05]: ../../reference/schemas/config/document.md
249-
[06]: ../../reference/cli/config/command.md
255+
[06]: ../../reference/cli/config/index.md

docs/concepts/enhanced-authoring.md

+27-25
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ description: >-
33
DSC configuration documents and resource manifests are YAML or JSON data files that adhere to a
44
published JSON schema. You can use enhanced schemas when authoring these files for an improved
55
experience.
6-
ms.date: 03/18/2025
6+
ms.date: 03/25/2025
77
title: Authoring with enhanced schemas
88
---
99

1010
# Authoring with enhanced schemas
1111

12+
<!-- markdownlint-capture -->
13+
1214
Working with Microsoft's Desired State Configuration (DSC) platform involves writing DSC
1315
[configuration documents][01] and [resource manifests][02]. Configuration documents are YAML or
1416
JSON data files that declare the desired state of a system. Resource manifests are JSON or YAML
@@ -22,18 +24,18 @@ specific to VS Code that:
2224
- Improve the contextual help when hovering on or selecting a property in the data file.
2325
- Add contextual help for enum values.
2426
- Improve the error messages for invalid values.
25-
- Add default snippets to autocomplete values.
27+
- Provide IntelliSense and default snippets.
2628

2729
> [!NOTE]
28-
> The enhanced schemas are non-canonical. Only specify them for the `$schema` keyword in a
30+
> The enhanced schemas are noncanonical. Only specify them for the `$schema` keyword in a
2931
> configuration document or resource manifest when your tools support it.
3032
>
3133
> These schemas are only for improving the authoring experience. If you try to validate the
3234
> configuration document or resource manifest with a tool that doesn't support the extended
33-
> vocabulary, the tool may raise an error.
35+
> vocabulary, the tool might raise an error.
3436
>
3537
> The enhanced schemas share the same source definition as the canonical schemas and validate the
36-
> data in the same way. However, they include non-canonical keywords. For maximum compatibility
38+
> data in the same way. However, they include noncanonical keywords. For maximum compatibility
3739
> with other tools, the canonical schemas only use the core JSON schema vocabularies.
3840
3941
For the full list of recognized and supported schema URIs, including the enhanced authoring
@@ -48,7 +50,7 @@ schemas, see the `$schema` sections in [DSC Configuration document schema refere
4850
:::image type="complex" source="media/enhanced-authoring/hover-help.png" alt-text="This screenshot shows enhanced hover documentation.":::
4951
This screenshot shows enhanced hover documentation for the 'type' property in a configuration document. The documentation includes a link at the top to the online documentation, followed by prose explaining the syntax for the property.
5052
:::image-end:::
51-
<!-- markdownlint-enable MD013 -->
53+
<!-- markdownlint-restore -->
5254

5355
With the enhanced schemas, hovering on a property displays contextual help rendered from Markdown.
5456
When possible, the hover help includes a link to the online documentation.
@@ -59,9 +61,9 @@ When possible, the hover help includes a link to the online documentation.
5961
:::image type="complex" source="media/enhanced-authoring/peek-help.png" alt-text="This screenshot shows enhanced documentation with autocomplete.":::
6062
This screenshot shows the DSC Resource instance autocomplete option and contextual documentation in a configuration document. The contextual help is shown to the side of the completion option list. The help includes a link to the online documentation, the descriptive prose, and the required properties.
6163
:::image-end:::
62-
<!-- markdownlint-enable MD013 -->
64+
<!-- markdownlint-restore -->
6365

64-
When using IntelliSense while authoring with an enhanced schema, the quick info shown for the
66+
When you use IntelliSense while authoring with an enhanced schema, the quick info shown for the
6567
completion options displays as rendered Markdown. When possible, the quick info includes a link to
6668
the online documentation.
6769

@@ -71,7 +73,7 @@ the online documentation.
7173
:::image type="complex" source="media/enhanced-authoring/enum-help.png" alt-text="This screenshot shows contextual documentation for an enum.":::
7274
This screenshot shows the contextual documentation for the 'return' property enum values in a resource manifest. The contextual help is shown beneath the enum list, describing the currently selected value.
7375
:::image-end:::
74-
<!-- markdownlint-enable MD013 -->
76+
<!-- markdownlint-restore -->
7577

7678
The enhanced schemas add documentation for enum values when using IntelliSense to select a valid
7779
value. By default, schemas can't provide per-enum documentation. They can only define documentation
@@ -87,7 +89,7 @@ for the property an enum belongs to.
8789
:::image type="complex" source="media/enhanced-authoring/snippet-completion.png" alt-text="This screenshot shows the editable output for the chosen snippet.":::
8890
This screenshot shows the editable output for the 'New metadata property (object)' snippet. It defined a new property named 'metadataName' with a nested key-value pair. The property name, key, and value are editable text that a user can tab through, like any other VS Code snippet.
8991
:::image-end:::
90-
<!-- markdownlint-enable MD013 -->
92+
<!-- markdownlint-restore -->
9193

9294
For common use cases, the enhanced schemas define sets of default snippets. These snippets are
9395
contextual and make it easier and faster to define the file. The snippets work like any other
@@ -97,19 +99,19 @@ snippets in VS Code.
9799

98100
<!-- markdownlint-disable MD013 -->
99101
:::image type="complex" source="media/enhanced-authoring/error-messages.png" alt-text="This screenshot shows an enhanced error message for failed validation.":::
100-
This screenshot shows a contextual error message when the name property for a resource instance doesn't match the validating regular expression. The value is the string 'invalid?' and the error message says "Invalid value for instance name. An instance name must be a non-empty string containing only letters, numbers, and spaces."
102+
This screenshot shows a contextual error message when the name property for a resource instance doesn't match the validating regular expression. The value is the string 'invalid?' and the error message says "Invalid value for instance name. An instance name must be a nonempty string containing only letters, numbers, and spaces."
101103
:::image-end:::
102-
<!-- markdownlint-enable MD013 -->
104+
<!-- markdownlint-restore -->
103105

104-
When defining values, the enhanced schemas have contextual error messages instead of the default
105-
error messages that JSON schema validation raises. This is particularly helpful for properties that
106-
must match a regular expression, where the default message just indicates that the value is invalid
107-
and lists the regular expression pattern.
106+
When you define values, the enhanced schemas provide contextual error messages instead of the
107+
default error messages that JSON schema validation raises. These messages are helpful for
108+
properties that must match a regular expression, where the default message just indicates that the
109+
value is invalid and lists the regular expression pattern.
108110

109111
## Using the enhanced configuration document schema
110112

111113
To associate every configuration document with the enhanced schema, add the following snippet to
112-
your [settings.json] file in VS Code. You can define these options in your user settings or for a
114+
your `settings.json` file in VS Code. You can define these options in your user settings or for a
113115
specific workspace.
114116

115117
<!-- markdownlint-disable MD013 -->
@@ -127,7 +129,7 @@ specific workspace.
127129
"https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json": "**.dsc.{yaml,yml,config.yaml,config.yml}"
128130
}
129131
```
130-
<!-- markdownlint-enable MD013 -->
132+
<!-- markdownlint-restore -->
131133

132134
These settings depend on the configuration documents having a name that ends with one of the
133135
following suffixes:
@@ -144,9 +146,9 @@ following comment to the top of the document:
144146

145147
<!-- markdownlint-disable MD013 -->
146148
```yml
147-
# yaml-language-server: $schema=aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json
149+
# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/config/document.vscode.json
148150
```
149-
<!-- markdownlint-enable MD013 -->
151+
<!-- markdownlint-resore -->
150152

151153
This option works regardless of the filename, but only for YAML files. To use the enhanced schema
152154
when authoring configuration documents in JSON, you must define the schema association in your
@@ -155,7 +157,7 @@ when authoring configuration documents in JSON, you must define the schema assoc
155157
## Using the enhanced resource manifest schema
156158

157159
To use the enhanced schema when authoring resource manifests, add the following snippet to
158-
your [settings.json] file in VS Code. You can define this option in your user settings or for a
160+
your `settings.json` file in VS Code. You can define this option in your user settings or for a
159161
specific workspace.
160162

161163
<!-- markdownlint-disable MD013 -->
@@ -170,7 +172,7 @@ specific workspace.
170172
"https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json": "**.dsc.resource.{yaml,yml}"
171173
}
172174
```
173-
<!-- markdownlint-enable MD013 -->
175+
<!-- markdownlint-restore -->
174176

175177
To associate a specific resource manifest formatted as YAML with the enhanced schema, add the
176178
following comment to the top of the manifest:
@@ -179,13 +181,13 @@ following comment to the top of the manifest:
179181
```yml
180182
# yaml-language-server: $schema=https://aka.ms/dsc/schemas/v3/bundled/resource/manifest.vscode.json
181183
```
182-
<!-- markdownlint-enable MD013 -->
184+
<!-- markdownlint-restore -->
183185

184186
This option works regardless of the filename, but only for YAML files. To use the enhanced schema
185187
when authoring resource manifests in JSON, you must define the schema association in your
186188
`settings.json`.
187189

188-
[01]: ./configuration-documents/index.md
189-
[02]: ../resources/concepts/anatomy.md#dsc-resource-manifests
190+
[01]: ./configuration-documents/overview.md
191+
[02]: ./resources/anatomy.md#dsc-resource-manifests
190192
[03]: ../reference/schemas/config/document.md#schema
191193
[04]: ../reference/schemas/resource/manifest/root.md#schema

docs/concepts/output-accessibility.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >-
33
This article aims to guide you through methods to output from PowerShell in formats that are
44
friendly for screen readers, enhancing the accessibility of your scripts.
55
ms.custom: experience
6-
ms.date: 03/18/2025
6+
ms.date: 03/25/2025
77
title: Improve the accessibility of DSC output in PowerShell
88
---
99

@@ -102,7 +102,7 @@ dsc resource list -a Microsoft.Windows/WindowsPowerShell |
102102
Format-List
103103
```
104104

105-
## Additional reading
105+
## Related content
106106

107107
- [Improve the accessibility of output in PowerShell][01]
108108
- [Out-GridView][02]

0 commit comments

Comments
 (0)