From 8b7579f93380a07169fdba9a42d66a1dc192c49a Mon Sep 17 00:00:00 2001 From: Michael Lombardi Date: Wed, 15 May 2024 09:01:15 -0500 Subject: [PATCH] (GH-258) Clarify `Invoke-DscResource` incompatible with composite resources 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 --- .../PSDesiredStateConfiguration/Invoke-DscResource.md | 5 ++++- .../PSDesiredStateConfiguration/Invoke-DscResource.md | 5 ++++- .../PSDesiredStateConfiguration/Invoke-DscResource.md | 5 ++++- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/dsc/dsc-1.1/PSDesiredStateConfiguration/Invoke-DscResource.md b/dsc/dsc-1.1/PSDesiredStateConfiguration/Invoke-DscResource.md index 08955b4..c9cbb7e 100644 --- a/dsc/dsc-1.1/PSDesiredStateConfiguration/Invoke-DscResource.md +++ b/dsc/dsc-1.1/PSDesiredStateConfiguration/Invoke-DscResource.md @@ -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 @@ -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 diff --git a/dsc/dsc-2.0/PSDesiredStateConfiguration/Invoke-DscResource.md b/dsc/dsc-2.0/PSDesiredStateConfiguration/Invoke-DscResource.md index f0839b0..6a2a2fe 100644 --- a/dsc/dsc-2.0/PSDesiredStateConfiguration/Invoke-DscResource.md +++ b/dsc/dsc-2.0/PSDesiredStateConfiguration/Invoke-DscResource.md @@ -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 @@ -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, diff --git a/dsc/dsc-3.0/PSDesiredStateConfiguration/Invoke-DscResource.md b/dsc/dsc-3.0/PSDesiredStateConfiguration/Invoke-DscResource.md index 962944a..af06353 100644 --- a/dsc/dsc-3.0/PSDesiredStateConfiguration/Invoke-DscResource.md +++ b/dsc/dsc-3.0/PSDesiredStateConfiguration/Invoke-DscResource.md @@ -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 @@ -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