Skip to content

Commit 06f7316

Browse files
(fixup) Sync docs
1 parent 11f2e7a commit 06f7316

File tree

78 files changed

+6059
-3219
lines changed

Some content is hidden

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

78 files changed

+6059
-3219
lines changed

dsc/docs-conceptual/dsc-3.0/concepts/configurations.md renamed to dsc/docs-conceptual/dsc-3.0/concepts/configuration-documents/overview.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ description: >-
33
DSC configuration documents are YAML or JSON data files that define the desired state of a system
44
declaratively. They are used to retrieve, validate, and enforce the state of multiple resource
55
instances.
6-
ms.date: 03/04/2025
6+
ms.date: 03/18/2025
77
title: DSC configuration documents
88
---
99

@@ -241,9 +241,9 @@ hadErrors: false
241241
- [DSC Configuration document schema reference][05]
242242
- [Command line reference for the 'dsc config' command][06]
243243

244-
[01]: ./resources.md
245-
[02]: ../reference/schemas/config/metadata.md#microsoftdsc
246-
[03]: ../reference/schemas/config/document.md
247-
[04]: ./resources.md#resource-type-names
248-
[05]: ../reference/schemas/config/document.md
249-
[06]: ../reference/cli/config/command.md
244+
[01]: ../resources/index.md.md
245+
[02]: ../../reference/schemas/config/metadata.md#microsoftdsc
246+
[03]: ../../reference/schemas/config/document.md
247+
[04]: ../resources/index.md#resource-type-names
248+
[05]: ../../reference/schemas/config/document.md
249+
[06]: ../../reference/cli/config/command.md

dsc/docs-conceptual/dsc-3.0/concepts/enhanced-authoring.md

Lines changed: 16 additions & 14 deletions
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/04/2025
6+
ms.date: 03/18/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
@@ -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,7 +61,7 @@ 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

6466
When using 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
@@ -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
@@ -99,7 +101,7 @@ snippets in VS Code.
99101
:::image type="complex" source="media/enhanced-authoring/error-messages.png" alt-text="This screenshot shows an enhanced error message for failed validation.":::
100102
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."
101103
:::image-end:::
102-
<!-- markdownlint-enable MD013 -->
104+
<!-- markdownlint-restore -->
103105

104106
When defining values, the enhanced schemas have contextual error messages instead of the default
105107
error messages that JSON schema validation raises. This is particularly helpful for properties that
@@ -109,7 +111,7 @@ and lists the regular expression pattern.
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]: configurations.md
190+
[01]: ./configuration-documents/index.md
189191
[02]: ../resources/concepts/anatomy.md#dsc-resource-manifests
190192
[03]: ../reference/schemas/config/document.md#schema
191193
[04]: ../reference/schemas/resource/manifest/root.md#schema

dsc/docs-conceptual/dsc-3.0/concepts/output-accessibility.md

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
---
2-
description: This article aims to guide you through methods to output from PowerShell in formats that are friendly for screen readers, enhancing the accessibility of your scripts.
2+
description: >-
3+
This article aims to guide you through methods to output from PowerShell in formats that are
4+
friendly for screen readers, enhancing the accessibility of your scripts.
35
ms.custom: experience
4-
ms.date: 09/12/2024
6+
ms.date: 03/18/2025
57
title: Improve the accessibility of DSC output in PowerShell
68
---
79

@@ -102,8 +104,15 @@ dsc resource list -a Microsoft.Windows/WindowsPowerShell |
102104

103105
## Additional reading
104106

105-
- [Improve the accessibility of output in PowerShell](/powershell/scripting/learn/shell/output-for-screen-reader)
106-
- [Out-GridView](xref:Microsoft.PowerShell.Utility.Out-GridView)
107-
- [Export-Csv](xref:Microsoft.PowerShell.Utility.Export-Csv)
108-
- [ConvertTo-Html](xref:Microsoft.PowerShell.Utility.ConvertTo-Html)
109-
- [about_Calculated_Properties](/powershell/module/microsoft.powershell.core/about/about_calculated_properties)
107+
- [Improve the accessibility of output in PowerShell][01]
108+
- [Out-GridView][02]
109+
- [Export-Csv][03]
110+
- [ConvertTo-Html][04]
111+
- [about_Calculated_Properties][05]
112+
113+
<!-- Link reference definitions -->
114+
[01]: /powershell/scripting/learn/shell/output-for-screen-reader
115+
[02]: xref:Microsoft.PowerShell.Utility.Out-GridView
116+
[03]: xref:Microsoft.PowerShell.Utility.Export-Csv
117+
[04]: xref:Microsoft.PowerShell.Utility.ConvertTo-Html
118+
[05]: /powershell/module/microsoft.powershell.core/about/about_calculated_properties

dsc/docs-conceptual/dsc-3.0/resources/concepts/anatomy.md renamed to dsc/docs-conceptual/dsc-3.0/concepts/resources/anatomy.md

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: >-
33
Describes the components of a DSC command resource, how DSC uses them, and what's required
44
of them.
5-
ms.date: 03/04/2025
5+
ms.date: 03/18/2025
66
title: Anatomy of a command-based DSC Resource
77
---
88

@@ -19,11 +19,17 @@ DSC command resources are defined with at least two files:
1919

2020
## DSC resource manifests
2121

22-
DSC resource manifests are defined as JSON files. For DSC to recognize a JSON file as a manifest,
22+
DSC resource manifests are defined as data files. For DSC to recognize a data file as a manifest,
2323
the file must meet the following criteria:
2424

25+
1. The data in the file must be formatted as YAML or JSON.
26+
1. The file must use UTF-8 encoding.
2527
1. The file must be discoverable in the `PATH` environment variable.
26-
1. The filename must end with `.dsc.resource.json`.
28+
1. The filename must end with one of the following suffixes:
29+
30+
- `.dsc.resource.json`
31+
- `.dsc.resource.yaml`
32+
- `.dsc.resource.yml`
2733

2834
When DSC searches the local system for available command resources, it searches every folder in the
2935
`PATH` for files that use the DSC resource manifest naming convention. DSC then parses each of
@@ -72,9 +78,6 @@ The manifest may define:
7278
The manifest doesn't need to specify the same executable file for every operation. The definition
7379
for each operation is independent.
7480

75-
<!-- For more information on authoring DSC Resource manifests, see
76-
[Authoring a DSC Resource Manifest][02]. -->
77-
7881
## DSC resource executables
7982

8083
Command resources always require an executable file for DSC to run. The manifest doesn't need to be
@@ -86,9 +89,6 @@ the executable once per operation, using the exit code returned by the executabl
8689
the command was successful. DSC treats exit code `0` as a success and all other exit codes as an
8790
error.
8891

89-
<!-- For more information about error handling, see
90-
[Handling errors in a DSC command resource][03]. -->
91-
9292
### Inputs
9393

9494
DSC sends input to command resources as one of the following:
@@ -131,24 +131,18 @@ Command resources can report logging information to DSC by emitting JSON Lines t
131131
Each log entry must be a JSON object that includes two keys:
132132

133133
1. The `message` key defines the human-readable string for the log entry.
134-
1. The `level` key defines whether the message represents an `error`, a `warning`, or `information`.
134+
1. The `level` key defines whether the message represents an `error`, a `warning`, or
135+
`information`.
135136

136137
DSC collects messages from resources and displays them in the results for a configuration
137138
operation. When DSC invokes a resource directly outside of a configuration, it doesn't collect the
138139
messages. Instead, DSC emits the messages to stderr.
139140

140-
<!-- For more information about logging from command-based DSC Resources, see
141-
[Logging messages from a DSC command resources][05]. -->
142-
143141
## Related Content
144142

145-
<!-- - [Authoring a DSC Resource Manifest][02] -->
146-
- [Write your first DSC Resource overview][06]
147143
- [DSC Resource Manifest schema reference][01]
144+
- [DSC Resources][02]
148145

149146
[01]: ../../reference/schemas/resource/manifest/root.md
150-
<!-- [02]: authoring-a-manifest.md -->
151-
<!-- [03]: handling-errors.md -->
147+
[02]: index.md
152148
[04]: https://jsonlines.org/
153-
<!-- [05]: logging-messages.md -->
154-
[06]: ../tutorials/first-resource/overview.md

0 commit comments

Comments
 (0)