Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/concepts/output-accessibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dsc resource list | ConvertFrom-Json | Out-GridView
The following example shows how to display a list of DSC adapted resources in a GridView control.

```powershell
dsc resource list -a Microsoft.Windows/WindowsPowerShell |
dsc resource list -a Microsoft.Adapter/WindowsPowerShell |
ConvertFrom-Json |
Out-GridView
```
Expand Down Expand Up @@ -83,7 +83,7 @@ Each of the following commands improves the output in a different way:
experience for screen readers.

```powershell
dsc resource list -a Microsoft.Windows/WindowsPowerShell |
dsc resource list -a Microsoft.Adapter/WindowsPowerShell |
ConvertFrom-Json |
Where-Object {$_.type -like "*process*" } |
Select-Object -Property Type, Kind, Version |
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/resources/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ DSC supports several kinds of resources:
resource instances and processes them. Group resources can apply special handling to their nested
resource instances, like changing the user the resources run as.
- An _adapter resource_ is a group resource that enables the use of noncommand resources with DSC.
For example, the `Microsoft.DSC/PowerShell` and `Microsoft.Windows/WindowsPowerShell` adapter
For example, the `Microsoft.Adapter/PowerShell` and `Microsoft.Adapter/WindowsPowerShell` adapter
resources enable the use of PowerShell DSC (PSDSC) resources in DSC, invoking the resources in
PowerShell and Windows PowerShell respectively.

Expand Down
542 changes: 0 additions & 542 deletions docs/get-started/index.md

This file was deleted.

6 changes: 3 additions & 3 deletions docs/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ DSC differs from PowerShell Desired State Configuration (PSDSC) in a few importa

- DSC doesn't _depend_ on PowerShell, Windows PowerShell, or the [PSDesiredStateConfiguration][01]
PowerShell module. DSC provides full compatibility with PSDSC resources through the
`Microsoft.DSC/PowerShell` and `Microsoft.Windows/WindowsPowerShell` _adapter resources_.
`Microsoft.Adapter/PowerShell` and `Microsoft.Adapter/WindowsPowerShell` _adapter resources_.

With the `Microsoft.DSC/PowerShell` adapter resource, you can use any PSDSC resource implemented
With the `Microsoft.Adapter/PowerShell` adapter resource, you can use any PSDSC resource implemented
as a PowerShell class. The resource handles discovering, validating, and invoking PSDSC
resources in PowerShell. The resource is included in the DSC install package for every platform.

With the `Microsoft.Windows/WindowsPowerShell` adapter resource, you can use any PSDSC resource
With the `Microsoft.Adapter/WindowsPowerShell` adapter resource, you can use any PSDSC resource
compatible with Windows PowerShell. The resource handles discovering, validating, and invoking
Comment on lines 54 to 63
Copy link

Copilot AI Mar 23, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR description says docs/get-started/index.md was updated, but in this PR it appears to be removed entirely. If the deletion is intentional, the PR description should be updated; otherwise, the file likely needs to be restored/updated instead of deleted.

Copilot uses AI. Check for mistakes.
PSDSC resources in Windows PowerShell. The resource is included in the DSC install packages for
Windows only.
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/cli/resource/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,14 +145,14 @@ adds the returned list of adapted resources to the discovered resource list. DSC
further filters specified with the command after this enumeration.

```sh
dsc resource list --adapter Microsoft.Windows/WindowsPowerShell
dsc resource list --adapter Microsoft.Adapter/WindowsPowerShell
```

This next command specifies the resource name filter `*Windows*`, limiting the list of returned
resources:

```sh
dsc resource list --adapter Microsoft.Windows/WindowsPowerShell *Windows*
dsc resource list --adapter Microsoft.Adapter/WindowsPowerShell *Windows*
```

## Arguments
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
description: >
Example showing how to configure a machine using multiple class-based PowerShell DSC resources
with the Microsoft.Adapter/PowerShell adapter in a DSC configuration document.

ms.date: 03/23/2026
ms.topic: reference
title: Configure a machine with the PowerShell adapter
---

This example shows how to use the `Microsoft.Adapter/PowerShell` adapter to configure a machine
using multiple class-based PowerShell DSC resources in a single configuration document. These
examples use the `Microsoft.WinGet.DSC/WinGetPackage` resource from the **Microsoft.WinGet.DSC**
module to ensure several packages are installed.

> [!NOTE]
> Run this example with `dsc.exe` version 3.2.0 or later and the **Microsoft.WinGet.DSC**
> PowerShell module installed. Install the module with:
> `Install-PSResource Microsoft.WinGet.DSC`

## Configuration document

The following configuration document defines multiple `Microsoft.WinGet.DSC/WinGetPackage`
instances. Each instance sets `directives.requireAdapter` to `Microsoft.Adapter/PowerShell`.

Save the following YAML as `dev-tools.dsc.yaml`:

```yaml
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
parameters:
ensureTools:
type: string
defaultValue: Present
allowedValues:
- Present
- Absent
resources:
- name: PowerShell 7
type: Microsoft.WinGet.DSC/WinGetPackage
directives:
requireAdapter: Microsoft.Adapter/PowerShell
properties:
Id: Microsoft.PowerShell
Ensure: "[parameters('ensureTools')]"
- name: Windows Terminal
type: Microsoft.WinGet.DSC/WinGetPackage
directives:
requireAdapter: Microsoft.Adapter/PowerShell
properties:
Id: Microsoft.WindowsTerminal
Ensure: "[parameters('ensureTools')]"
- name: Visual Studio Code
type: Microsoft.WinGet.DSC/WinGetPackage
directives:
requireAdapter: Microsoft.Adapter/PowerShell
properties:
Id: Microsoft.VisualStudioCode
Ensure: "[parameters('ensureTools')]"
```

## Test the configuration

Run the configuration test to check whether the packages are installed:

```powershell
dsc config test --file dev-tools.dsc.yaml
```

DSC reports the results for each instance, showing which packages need to be installed.

## Apply the configuration

Run the configuration set to install any packages that aren't already present:

```powershell
dsc config set --file dev-tools.dsc.yaml
```

## Remove the packages

To uninstall the packages, override the `ensureTools` parameter when applying the configuration:

```powershell
dsc config set --file dev-tools.dsc.yaml --parameters '{"ensureTools": "Absent"}'
```

<!-- Link references -->
[01]: ../../../../../../cli/config/test.md
[02]: ../../../../../../cli/config/set.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
---
description: >
Example showing how to invoke a class-based PowerShell DSC resource using
Microsoft.Adapter/PowerShell in a DSC configuration document.
ms.date: 03/23/2026
ms.topic: reference
title: Invoke a resource with the PowerShell adapter
---

This example shows how to use the `Microsoft.Adapter/PowerShell` adapter to invoke a class-based
PowerShell DSC resource. These examples use the `Microsoft.WinGet.DSC/WinGetPackage` resource from
the **Microsoft.WinGet.DSC** module to check whether Windows Terminal is installed.

> [!NOTE]
> Run this example with `dsc.exe` version 3.2.0 or later and the **Microsoft.WinGet.DSC**
> PowerShell module installed. Install the module with:
> `Install-PSResource Microsoft.WinGet.DSC`

## Test whether a WinGet package is installed

The following configuration document defines a single `Microsoft.WinGet.DSC/WinGetPackage`
instance that uses `directives.requireAdapter` to route the resource through the
`Microsoft.Adapter/PowerShell` adapter.

Save the following YAML as `winget-test.dsc.yaml`:

```yaml
$schema: https://aka.ms/dsc/schemas/v3/bundled/config/document.json
resources:
- name: Windows Terminal
type: Microsoft.WinGet.DSC/WinGetPackage
directives:
requireAdapter: Microsoft.Adapter/PowerShell
properties:
Id: Microsoft.WindowsTerminal
Ensure: Present
```

Run the configuration test operation to check whether Windows Terminal is installed:

```powershell
dsc config test --file winget-test.dsc.yaml
```

When the package isn't installed, DSC returns the following result:

```yaml
metadata:
Microsoft.DSC:
version: 3.2.0
operation: test
executionType: actual
startDatetime: '2026-03-23T00:00:00.000000000+00:00'
endDatetime: '2026-03-23T00:00:01.000000000+00:00'
duration: PT1S
securityContext: restricted
results:
- metadata:
Microsoft.DSC:
duration: PT0.5S
name: Windows Terminal
type: Microsoft.WinGet.DSC/WinGetPackage
result:
desiredState:
Id: Microsoft.WindowsTerminal
Ensure: Present
actualState:
Id: Microsoft.WindowsTerminal
Ensure: Absent
inDesiredState: false
differingProperties:
- Ensure
messages: []
hadErrors: false
```

The `inDesiredState` field is `false` and `differingProperties` shows that `Ensure` differs between
the desired state and the actual state.

## Install a WinGet package

Use the `dsc config set` command to configure the system to the desired state:

```powershell
dsc config set --file winget-test.dsc.yaml
```

When the resource installs the package, DSC returns the following result:

```yaml
metadata:
Microsoft.DSC:
version: 3.2.0
operation: set
executionType: actual
startDatetime: '2026-03-23T00:00:00.000000000+00:00'
endDatetime: '2026-03-23T00:00:05.000000000+00:00'
duration: PT5S
securityContext: restricted
results:
- metadata:
Microsoft.DSC:
duration: PT4S
name: Windows Terminal
type: Microsoft.WinGet.DSC/WinGetPackage
result:
beforeState:
Id: Microsoft.WindowsTerminal
Ensure: Absent
afterState:
Id: Microsoft.WindowsTerminal
Ensure: Present
changedProperties:
- Ensure
messages: []
hadErrors: false
```
Loading
Loading