Skip to content
This repository was archived by the owner on Feb 15, 2026. It is now read-only.

Commit 5c6be59

Browse files
G.ReijnG.Reijn
authored andcommitted
Update with new articles and change text for clarification
1 parent bb5c5f9 commit 5c6be59

5 files changed

+45
-23
lines changed

content/blog/a-first-look-at-dsc-v3.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,3 @@ On many popular forums, the question arose “is Desired State Configuration sti
1313
You might also not be aware that the PowerShell team has released the alpha version of DSCv3, which is publicly available.
1414

1515
This blog post was posted on [Medium](https://medium.com/@gijsreijn/a-first-look-at-desired-state-configuration-v3-379ee8181d6a).
16-
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
authors:
3+
- name: Gijs Reijn
4+
link: https://github.com/gijsreyn
5+
image: https://avatars.githubusercontent.com/gijsreyn
6+
date: 2025-04-04
7+
linktitle: 'DSC v3 Oversimplified: Three Ways to Author and Invoke Configuration Documents'
8+
title: 'DSC v3 Oversimplified: Three Ways to Author and Invoke Configuration Documents'
9+
---
10+
11+
DSC's v3 engine isn't the only way to invoke a configuration document. Nor does the authoring have to happen purely in DSC v3 format.
12+
13+
Configuration documents for DSC v3 are written in YAML and JSON. If you come from the old days, that can surprise you. Configuration documents were originally solely written in PowerShell.
14+
15+
DSC v3, or now changed to Microsoft DSC 3.0, does it differently. And for several reasons. One of those is the fact that DSC in itself is an executable that can be executed from orchestration tools. Think of Azure Machine Configuration, which, quite frankly, was also available for DSC v2.
16+
17+
This blog post was posted on [Medium](https://medium.com/@gijsreijn/dsc-v3-oversimplified-three-ways-to-author-and-invoke-configuration-documents-639a138e3e5d).
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
---
2+
authors:
3+
- name: Gijs Reijn
4+
link: https://github.com/gijsreyn
5+
image: https://avatars.githubusercontent.com/gijsreyn
6+
date: 2025-04-15
7+
linktitle: The Three Straightforward Ways To Get Microsoft's DSC v3 Input Properties
8+
title: The Three Straightforward Ways To Get Microsoft's DSC v3 Input Properties
9+
---
10+
11+
Microsoft DSC v3 introduced command-based and non-command-based DSC resources (adapter).
12+
13+
This fundamental change has changed the way you can retrieve the input properties. Typically, you would use the Get-DscResource command to discover the available properties on script-based and class-based DSC resources.
14+
15+
Because Microsoft DSC v3 is a command-line interface (CLI) application that uses JSON and YAML, retrieving the input properties doesn’t work using the command mentioned earlier.
16+
17+
This blog post was posted on [Medium](https://medium.com/@gijsreijn/the-three-straightforward-ways-to-get-microsofts-dsc-v3-input-properties-771a5e3b02e8).

content/docs/getting-started.md

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ To install DSC for Windows from GitHub, follow these steps:
1111

1212
### Step 1 - Determine your OS architecture
1313

14-
There are multiple ways to determine the operating system (OS) architecture. The following three demonstrate using the command prompt PowerShell, or msinfo.
14+
There are multiple ways to determine the operating system (OS) architecture. The following three demonstrate using the command prompt, PowerShell, or msinfo.
1515

1616
1. Open a command prompt and type: `echo %PROCESSOR_ARCHITECTURE%`.
1717
2. Open a PowerShell terminal session and type: `[System.Runtime.InteropServices.RuntimeInformation]::OSArchitecture`.
@@ -39,7 +39,7 @@ When the download is finished, you can expand the files to extract them to your
3939

4040
1. Right-click the file and select _Extract All..._
4141
2. Extract the files to `C:\Users\<userProfile>\AppData\Local\dsc` by replacing the `<userProfile>` with your profile name.
42-
3. Open a command prompt and type `rundll32.exe sysdm.cpl,EditEnvironmentVariables` to open the environment variables.
42+
3. Open a command prompt and type: `rundll32.exe sysdm.cpl,EditEnvironmentVariables` to open the environment variables.
4343
4. In your user variables, edit your `PATH` environment variable and include the path `C:\Users\<userProfile>\AppData\Local\dsc`.
4444

4545
### Step 4 - Verify the installation
@@ -53,12 +53,6 @@ When the download is finished, you can expand the files to extract them to your
5353

5454
This should return the DSC version installed.
5555

56-
{{< figure
57-
src="/images/dsc-version.png"
58-
alt="DSC version"
59-
caption="Figure 2: The DSC version installed"
60-
>}}
61-
6256
> [!IMPORTANT]
6357
> After the files are extracted, make sure the files are unblocked in your file system.
6458
@@ -83,7 +77,7 @@ To install DSC using the PSDSC module, follow the below steps:
8377
Install-DscExe
8478
```
8579
86-
This installs DSC in your `"$env:LOCALAPPDAT\dsc"` folder. To verify the result, run `dsc --version`
80+
This installs DSC in your `$env:LOCALAPPDAT\dsc` folder. To verify the result, run `dsc --version`
8781
8882
```powershell
8983
dsc --version

content/docs/initiate/level-1-the-basics.md

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To display the possible values for each option, you can simply type in: `dsc` in
5050
caption="Figure 1: The commands and options available"
5151
>}}
5252
53-
If you're unsure about a command, you can always ask the CLI for help. This applies to each subcommand. For example, to get help for the config command, type: `dsc config --help`.
53+
If you're unsure about a command, you can always ask the CLI for help. This applies to each subcommand. For example, to get help for the `config` command, type: `dsc config --help`.
5454

5555
```plaintext
5656
Apply a configuration document
@@ -67,7 +67,7 @@ Commands:
6767
...
6868
```
6969

70-
You now know how you can ask the CLI for help, but what about DSC resources in general? Before looking at a DSC resource and run it, it will be helpful to have a completion script registered. A completion script allows you to easily perform so called tab-completions when using the CLI from a command-line shell, like PowerShell or the Bash terminal. The following steps demonstrates how you can add a completion script in a PowerShell profile:
70+
You now know how you can ask the CLI for help, but what about DSC resources in general? Before looking at a DSC resource and running it, it will be helpful to have a completion script registered. A completion script allows you to easily perform so-called tab-completions when using the CLI from a command-line shell, like PowerShell or the Bash terminal. The following steps demonstrate how you can add a completion script in a PowerShell profile:
7171

7272
1. Open a PowerShell session.
7373
2. Execute `dsc completer powershell | clip` to add the completion script to the clipboard.
@@ -82,7 +82,7 @@ Depending on the version of PowerShell you are using, once you have added the co
8282

8383
## Executing Your First DSC Resource
8484

85-
To run your first DSC resource, you need to understand what a DSC resource is. A DSC resource allows you to define the desired state of a specific part of your system and ensures it remains in that state. The logic behind a DSC resource can be written in any programming language, such as a bash script, a .NET executable, or a CLI written in Rust. As long as the tool you create follows certain schema semantics, it can be used as a DSC resource.
85+
To run your first DSC resource, it's important to understand what a DSC resource actually is. At its core, a DSC resource is a package of code that lets you define the desired state for a specific part of your system — whether that's a Windows Server, an iMac, or Linux machine — and ensures it stays in that state when enforced by orchestration tools. What makes DSC resources flexible is that they can be written in virtually any programming language. You could use bash scripts, create a .NET executable, or even CLIs written in Rust. The only requirement is that your code adheres to the schema semantics of `dsc`, allowing it to participate and be utilized as a _DSC resource_.
8686

8787
Now you know what a DSC resource is, you need to know how to find them. To do so, you can use the `dsc resource list` command. What the command will do in the background is the following:
8888

@@ -94,7 +94,7 @@ Now you know what a DSC resource is, you need to know how to find them. To do so
9494
- `.dsc.resource.yml`
9595
- `.dsc.resource.yaml`
9696

97-
If files with these suffixes are found in the mentioned directories, DSC will load them, search for the required elements, and display the results in the console. If the required elements are missing, DSC will provide a warning indicating which properties are absent. The following output shows what DSC has found. These are the builtin resources when you've installed DSC.
97+
If files with these suffixes are found in the mentioned directories, DSC will load them, search for the required elements, and display the results in the console. If the required elements are missing, DSC will provide a warning indicating which properties are absent. The following output shows what DSC has found. These are the builtin resources when you've installed DSC on a Windows OS.
9898

9999
```plaintext
100100
Type Kind Version Capabilities RequireAdapter Description
@@ -115,7 +115,7 @@ Microsoft/OSInfo Resource 0.1.0 g-----e-
115115
> [!NOTE]
116116
> For now, don't worry about the suffix. You'll learn more about it in the next level.
117117
118-
It can be an excruciating list at first sight. That's why it can be filtered down to focus on the `Resource` kind for now. The following command demonstrates how to find all DSC resources of type `resource`.
118+
To filter down the list, you can focus on the `resource` kind for now. The following command demonstrates how to find all DSC resources of type `resource`.
119119

120120
```powershell
121121
dsc resource list |
@@ -134,14 +134,14 @@ Microsoft.Windows/Registry {get, set, whatIf, delete}
134134
Microsoft/OSInfo {get, export}
135135
```
136136

137-
You now have a filtered list of DSC resources that are builtin when you've installed DSC.
137+
You now have a filtered list of _command-based_ DSC resources that are builtin.
138138

139139
> [!IMPORTANT]
140140
> The output shown is from a Windows machine. If you are using a different operating system, the output may be different.
141141
142142
In the output table when `dsc resource list` is run, flags such as `gs--t---` are displayed. When the output is piped (|) and converted with `ConvertFrom-Json`, the actual capability full names are shown. This demonstrates what the resource has implemented and what capabilities you can call using `dsc resource <capability>`.
143143

144-
You got the first piece how you can call the DSC resource. Let's pick the `Microsoft/OSInfo` resource. If you want to use the `get` capability, the command would start with `dsc resource get --resource Microsoft/OSInfo`. There is only one piece missing to execute the DSC resource: what input _might_ be required to interact with it?
144+
You got the first piece how you can call the DSC resource. Let's pick the `Microsoft/OSInfo` resource to experiment with. If you want to use the `get` capability, the command would start with `dsc resource get --resource Microsoft/OSInfo`. There is only one piece missing to execute the DSC resource: what input _might_ be required to interact with it?
145145

146146
DSC resources follow a certain schema. You should see a schema somewhat as a contract when you purchase a house. In the contract it clearly states what will be _in_ the house and what you will get _out_ of it when you purchase it. To see such contract, or schema, you can use the `dsc resource schema` command. When you want to display it for the `Microsoft/OSInfo` resource, you can run:
147147

@@ -214,15 +214,10 @@ You have successfully ran your first DSC resource. Before making things to compl
214214
215215
You've already learned the `--help` option for each subcommand. Make this a habit if you aren't certain about a command. Each time you append the `--help` option, it will reveal the help information.
216216

217-
The official documentation is published on Microsoft Learn, the platform from Microsoft for all learning materials. You can find it using the following link: <https://learn.microsoft.com/en-us/powershell/>. In the tiles you can search and find _PowerShell DSC_.
217+
The official documentation is published on Microsoft Learn, the platform from Microsoft for all learning materials. You can find it using the following link: <https://learn.microsoft.com/en-us/powershell/>. In the tiles you can search and find _Microsoft DSC_.
218218

219219
To stay up to date with the latest releases, you can check out the official repository at: <https://github.com/PowerShell/DSC/releases>. Always keep your CLI version up to date to get the latest functionality and bug fixes!
220220

221-
There is also a YouTube channel to follow, which is the official DSC community channel found at: <https://www.youtube.com/@dsccommunity2958>. The DSC community itself also has:
222-
223-
- Twitter at @dsccommunity
224-
- Discord in the following link: <https://discordapp.com/invite/AtzXnJM>
225-
226221
## Lab Questions
227222

228223
You have now successfully learned about the basics and executed your first DSC resource. It's time to reinforce your understanding by completing the following lab questions:

0 commit comments

Comments
 (0)