Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit04512fa

Browse files
authored
Merge branch 'main' into reference-doc-runcommandonset
2 parents0d9671a +59235c4 commit04512fa

File tree

5 files changed

+275
-5
lines changed

5 files changed

+275
-5
lines changed

‎CONTRIBUTING.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,11 @@ Please read the rest of this document to ensure a smooth contribution process.
2626

2727
###Contributing to documentation related to DSC
2828

29-
Please see the[PowerShell-Docs-DSC](https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/) repository for details.
29+
You can contribute to documentation either in the`docs` folder of this repository
30+
or in the[PowerShell-Docs-DSC](https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/) repository.
31+
32+
>[!INFO]
33+
>Documentation contributed to the`docs` folder in this repository is periodically synced to the[PowerShell-Docs-DSC](https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/) repository.
3034
3135
###Contributing to documentation related to maintaining or contributing to the DSC project
3236

‎README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
#DSCv3
22

33
>[!NOTE]
4-
>This repo isn't accepting code contributions. It's public and open source to show progress and
5-
>enable feedback. Once we're at a feature complete state, we can start taking code contributions.
4+
>We welcome code contributions to this repository. For guidelines on how to contribute,
5+
>see our[CONTRIBUTING.md](CONTRIBUTING.md).
6+
>Your feedback and participation help us improve DSCv3 for everyone.
67
78
##What's DSCv3?
89

@@ -22,7 +23,7 @@ DSCv3 differs from PowerShell DSC in a few important ways:
2223

2324
- DSCv3 doesn't depend on PowerShell. You can use DSCv3 without PowerShell installed and manage
2425
resources written in bash, python, C#, Go, or any other language.
25-
- DSCv3 use of PowerShell based resources does not depend on PSDesiredStateConfiguration module
26+
- DSCv3 use of PowerShell based resources does not depend on[PSDesiredStateConfiguration][00] module
2627
- DSCv3 doesn't include a local configuration manager. DSCv3 is invoked as a command. It doesn't
2728
run as a service.
2829
- Non-PowerShell resources define their schemas with JSON files, not MOF files.
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
---
2+
description:Demonstrates basic usage of the Microsoft.DSC.Debug/Echo resource
3+
ms.date:06/22/2025
4+
ms.topic:reference
5+
title:Basic echo example
6+
---
7+
8+
This example demonstrates how to use the`Microsoft.DSC.Debug/Echo` to test the output returned by DSC.
9+
10+
##Test the output returned by DSC
11+
12+
The following snippet shows how you can use the resource with the[dsc resource test][01] command to test if the
13+
system is in the desired state.
14+
15+
```powershell
16+
$instance = @{
17+
output = 'Hello World!'
18+
} | ConvertTo-Json
19+
20+
dsc resource test --resource Microsoft.DSC.Debug/Echo --input $instance
21+
```
22+
23+
```yaml
24+
desiredState:
25+
output:Hello World!
26+
actualState:
27+
output:Hello World!
28+
inDesiredState:true
29+
differingProperties:[]
30+
```
31+
32+
> [!NOTE]
33+
> The`Microsoft.DSC.Debug/Echo` resource always returns `inDesiredState: true` because it's a
34+
> test resource designed to echo back values.
35+
> It doesn't actually check or enforce anything on the system - it simply returns whatever value you
36+
> provide as output.
37+
38+
## Using the get capability
39+
40+
The `Microsoft.DSC.Debug/Echo` resource's `get` capability returns the current value in the output property:
41+
42+
```powershell
43+
$instance = @{
44+
output = 'Hello World!'
45+
} | ConvertTo-Json
46+
47+
dsc resource get --resource Microsoft.DSC.Debug/Echo --input $instance
48+
```
49+
50+
The resource will return the same output value:
51+
52+
```yaml
53+
actualState:
54+
output: Hello World!
55+
```
56+
57+
## Using the set capability
58+
59+
The `Microsoft.DSC.Debug/Echo` resource's `set` capability simply accepts a value and echoes
60+
it back without modifying anything:
61+
62+
```powershell
63+
$instance = @{
64+
output = @{
65+
name = "ExampleSetting"
66+
value = 123
67+
enabled = $true
68+
}
69+
} | ConvertTo-Json
70+
71+
dsc resource set --resource Microsoft.DSC.Debug/Echo --input $instance
72+
```
73+
74+
This will report success and echo the complex object:
75+
76+
```yaml
77+
beforeState:
78+
output:
79+
value: 123
80+
enabled: true
81+
name: ExampleSetting
82+
afterState:
83+
output:
84+
value: 123
85+
enabled: true
86+
name: ExampleSetting
87+
changedProperties: []
88+
```
89+
90+
> [!NOTE]
91+
> Even though you're using the `set` capability, no actual changes are made to the system.
92+
93+
## See also
94+
95+
-[Microsoft.DSC.Debug/Echo resource](../index.md)
96+
97+
<!-- Link reference definitions -->
98+
[01]:../../../../../cli/resource/test.md
Lines changed: 167 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,167 @@
1+
---
2+
description:Microsoft.DSC.Debug/Echo resource reference documentation
3+
ms.date:06/22/2025
4+
ms.topic:reference
5+
title:Microsoft.DSC.Debug/Echo
6+
---
7+
8+
#Microsoft.DSC.Debug/Echo
9+
10+
##Synopsis
11+
12+
A debug resource for testing and troubleshooting Microsoft DSC (Desired State Configuration) behavior.
13+
14+
##Metadata
15+
16+
```yaml
17+
Version:1.0.0
18+
Kind:resource
19+
Tags:[Windows, MacOS, Linux]
20+
Author:Microsoft
21+
```
22+
23+
## Instance definition syntax
24+
25+
```yaml
26+
resources:
27+
-name:<instance name>
28+
type:Microsoft.DSC.Debug/Echo
29+
properties:
30+
# Required properties
31+
output:anyOf# array, boolean, integer, object, string
32+
```
33+
34+
## Description
35+
36+
The`Microsoft.DSC.Debug/Echo` resource is a debugging utility that echoes back the configuration
37+
data passed to it. This resource is particularly useful for:
38+
39+
-Testing DSC configuration syntax and structure.
40+
-Debugging parameter passing between resources.
41+
-Verifying that DSC is processing configurations as expected.
42+
-Understanding how DSC transforms and handles configuration data.
43+
44+
> [!NOTE]
45+
> This resource is installed with DSC itself on any systems.
46+
>
47+
> You can update this resource by updating DSC. When you update DSC, the updated version of this
48+
> resource is automatically available.
49+
50+
## Capabilities
51+
52+
The resource has the following capabilities:
53+
54+
-`get`- You can use the resource to retrieve the actual state of an instance.
55+
-`set`- You can use the resource to enforce the desired state for an instance.
56+
-`test`- You can use the resource to check if the actual state matches the desired state
57+
for an instance.
58+
59+
For more information about resource capabilities, see
60+
[DSC resource capabilities][01].
61+
62+
> [!NOTE]
63+
> Invoking any operation on this resource doesn't affect the system.
64+
> This resource only echoes the value in the output.
65+
66+
## Examples
67+
68+
1. [Basic echo example](./examples/basic-echo-example.md) - Shows how to use the Echo resource
69+
for basic string and complex data output.
70+
71+
## Properties
72+
73+
The following list describes the properties for the resource.
74+
75+
- **Required properties:** <a id="required-properties"></a> The following property is always
76+
required when defining an instance of the resource. An instance that doesn't define this
77+
property is invalid. For more information, see the "Required resource properties" section in
78+
[DSC resource properties][02]
79+
80+
-[output](#output) - The value to be echoed back by the resource.
81+
82+
- **Key properties:** <a id="key-properties"></a> The following property uniquely identifies an
83+
instance. If two instances of a resource have the same value for this property, the instances are
84+
conflicting. For more information about key properties, see the "Key resource properties" section in [DSC resource properties][03].
85+
86+
-[output](#output) (required) - The value to be echoed back by the resource.
87+
88+
### output
89+
90+
<details><summary>Expand for <code>output</code> property metadata</summary>
91+
92+
```yaml
93+
Type : anyOf (array, boolean, integer, object, string)
94+
IsRequired : true
95+
IsKey : true
96+
IsReadOnly : false
97+
IsWriteOnly : false
98+
```
99+
100+
</details>
101+
102+
Defines the value to be echoed back by the resource. The `output` property can be any of the following types:
103+
104+
| Type | Description |
105+
|:-------:|:---------------------------------------------|
106+
| array | An array of values. |
107+
| boolean | A boolean value (`true` or `false`). |
108+
| integer | An integer value. |
109+
| object | A JSON object of key-value pairs. |
110+
| string | A string value. |
111+
112+
## Instance validating schema
113+
114+
The following snippet contains the JSON Schema that validates an instance of the resource. The
115+
validating schema only includes schema keywords that affect how the instance is validated. All
116+
non validating keywords are omitted.
117+
118+
```json
119+
{
120+
"type": "object",
121+
"required": [
122+
"output"
123+
],
124+
"properties": {
125+
"output": {
126+
"$ref": "#/definitions/Output"
127+
}
128+
},
129+
"additionalProperties": false,
130+
"definitions": {
131+
"Output": {
132+
"anyOf": [
133+
{
134+
"type": "array",
135+
"items": true
136+
},
137+
{
138+
"type": "boolean"
139+
},
140+
{
141+
"type": "integer",
142+
"format": "int64"
143+
},
144+
true,
145+
true,
146+
{
147+
"type": "object"
148+
},
149+
{
150+
"type": "string"
151+
}
152+
]
153+
}
154+
}
155+
}
156+
```
157+
158+
## See also
159+
160+
-[Microsoft/OSInfo resource][04]
161+
-[DSC resource capabilities][01]
162+
163+
<!-- Link definitions -->
164+
[01]:../../../../../concepts/resources/capabilities.md
165+
[02]:../../../../../concepts/resources/properties.md#required-resource-properties
166+
[03]:../../../../../concepts/resources/properties.md#key-resource-properties
167+
[04]:../../osinfo/index.md

‎docs/reference/resources/Microsoft/Windows/Registry/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ operation without the `--what-if` flag.
343343

344344
The following snippet contains the JSON Schema that validates an instance of the resource. The
345345
validating schema only includes schema keywords that affect how the instance is validated. All
346-
nonvalidating keywords are omitted.
346+
non validating keywords are omitted.
347347

348348
```json
349349
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp