Skip to content

Commit

Permalink
(GH-258) Clarify Invoke-DscResource incompatible with composite res…
Browse files Browse the repository at this point in the history
…ources

Prior to this change, the reference documentation for `Invoke-DscResource`
didn't clearly state that the cmdlet is incompatible with composite resources.

This change:

- Clarifies that `Invoke-DscResource` can't be used to invoke composite resources,
  which require the LCM.
- Resolves #258
- Fixes AB#255214
  • Loading branch information
michaeltlombardi committed May 15, 2024
1 parent 6077790 commit 8b7579f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: Microsoft.Windows.DSC.CoreConfProviders.dll-Help.xml
Locale: en-US
Module Name: PSDesiredStateConfiguration
ms.date: 10/04/2021
ms.date: 05/15/2024
online version: https://learn.microsoft.com/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-1.1&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Invoke-DscResource
Expand Down Expand Up @@ -30,6 +30,9 @@ This cmdlet invokes a DSC resource directly, without creating a configuration do
cmdlet, configuration management products can manage windows by using DSC resources. This cmdlet
also enables debugging of resources when the DSC engine or LCM is running with debugging enabled.

This cmdlet doesn't work with composite resources. Composite resources are parameterized
configurations. Using composite resources requires the LCM.

## EXAMPLES

### Example 1: Invoke the Set method of a resource by specifying its mandatory properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: PSDesiredStateConfiguration-help.xml
Locale: en-US
Module Name: PSDesiredStateConfiguration
ms.date: 03/21/2023
ms.date: 05/15/2024
online version: https://learn.microsoft.com/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-2.0&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Invoke-DscResource
Expand All @@ -28,6 +28,9 @@ The `Invoke-DscResource` cmdlet runs a method of a specified PowerShell Desired
This cmdlet invokes a DSC resource directly, without creating a configuration document. Using this
cmdlet, configuration management products can manage windows or Linux with DSC resources.

This cmdlet doesn't work with composite resources. Composite resources are parameterized
configurations. Using composite resources requires the LCM.

> [!NOTE]
> Before PSDesiredStateConfiguration 2.0.6, using `Invoke-DscResource` in PowerShell 7 requires
> enabling a PowerShell experimental feature. To use the cmdlet in versions 2.0.0 through 2.0.5,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
external help file: PSDesiredStateConfiguration-help.xml
Locale: en-US
Module Name: PSDesiredStateConfiguration
ms.date: 03/21/2023
ms.date: 05/15/2024
online version: https://learn.microsoft.com/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-3.0&WT.mc_id=ps-gethelp
schema: 2.0.0
title: Invoke-DscResource
Expand All @@ -28,6 +28,9 @@ The `Invoke-DscResource` cmdlet runs a method of a specified PowerShell Desired
This cmdlet invokes a DSC resource directly, without creating a configuration document. Using this
cmdlet, configuration management products can manage windows or Linux with DSC resources.

This cmdlet doesn't work with composite resources. Composite resources are parameterized
configurations. Using composite resources requires the LCM.

## EXAMPLES

### Example 1: Invoke the Set method of a resource by specifying its mandatory properties
Expand Down

0 comments on commit 8b7579f

Please sign in to comment.