Skip to content

Commit b0638ce

Browse files
(GH-258) Clarify Invoke-DscResource incompatible with composite resources (#259)
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
1 parent 6077790 commit b0638ce

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

dsc/dsc-1.1/PSDesiredStateConfiguration/Invoke-DscResource.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: Microsoft.Windows.DSC.CoreConfProviders.dll-Help.xml
33
Locale: en-US
44
Module Name: PSDesiredStateConfiguration
5-
ms.date: 10/04/2021
5+
ms.date: 05/15/2024
66
online version: https://learn.microsoft.com/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-1.1&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Invoke-DscResource
@@ -30,6 +30,9 @@ This cmdlet invokes a DSC resource directly, without creating a configuration do
3030
cmdlet, configuration management products can manage windows by using DSC resources. This cmdlet
3131
also enables debugging of resources when the DSC engine or LCM is running with debugging enabled.
3232

33+
This cmdlet doesn't work with composite resources. Composite resources are parameterized
34+
configurations. Using composite resources requires the LCM.
35+
3336
## EXAMPLES
3437

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

dsc/dsc-2.0/PSDesiredStateConfiguration/Invoke-DscResource.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: PSDesiredStateConfiguration-help.xml
33
Locale: en-US
44
Module Name: PSDesiredStateConfiguration
5-
ms.date: 03/21/2023
5+
ms.date: 05/15/2024
66
online version: https://learn.microsoft.com/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-2.0&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Invoke-DscResource
@@ -28,6 +28,9 @@ The `Invoke-DscResource` cmdlet runs a method of a specified PowerShell Desired
2828
This cmdlet invokes a DSC resource directly, without creating a configuration document. Using this
2929
cmdlet, configuration management products can manage windows or Linux with DSC resources.
3030

31+
This cmdlet doesn't work with composite resources. Composite resources are parameterized
32+
configurations. Using composite resources requires the LCM.
33+
3134
> [!NOTE]
3235
> Before PSDesiredStateConfiguration 2.0.6, using `Invoke-DscResource` in PowerShell 7 requires
3336
> enabling a PowerShell experimental feature. To use the cmdlet in versions 2.0.0 through 2.0.5,

dsc/dsc-3.0/PSDesiredStateConfiguration/Invoke-DscResource.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
external help file: PSDesiredStateConfiguration-help.xml
33
Locale: en-US
44
Module Name: PSDesiredStateConfiguration
5-
ms.date: 03/21/2023
5+
ms.date: 05/15/2024
66
online version: https://learn.microsoft.com/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-3.0&WT.mc_id=ps-gethelp
77
schema: 2.0.0
88
title: Invoke-DscResource
@@ -28,6 +28,9 @@ The `Invoke-DscResource` cmdlet runs a method of a specified PowerShell Desired
2828
This cmdlet invokes a DSC resource directly, without creating a configuration document. Using this
2929
cmdlet, configuration management products can manage windows or Linux with DSC resources.
3030

31+
This cmdlet doesn't work with composite resources. Composite resources are parameterized
32+
configurations. Using composite resources requires the LCM.
33+
3134
## EXAMPLES
3235

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

0 commit comments

Comments
 (0)