Skip to content

Invoke-DscResource can't be used with composite resources #258

@DennisL68

Description

@DennisL68

Type of issue

Missing information

Feedback

A composite resource is a configuration, it never gets loaded by the LCM. (A configuration needs to be compiled and the resources it calls are the ones that the LCM needs to load). This is why an Invoke-DscResource on a composite resource will not work and you should call it on the underlying resource.

See, http://nanalakshmanan.com/blog/Composite-Resources-Explained/

Page URL

https://learn.microsoft.com/en-us/powershell/module/psdesiredstateconfiguration/invoke-dscresource?view=dsc-2.0

Content source URL

https://github.com/MicrosoftDocs/PowerShell-Docs-DSC/blob/main/dsc/dsc-2.0/PSDesiredStateConfiguration/Invoke-DscResource.md

Author

@sdwheeler

Document Id

1ab73932-fc3e-496b-633a-31f01704dec9

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-cmdletArea - Cmdlet referencedsc-v1Version - DSC v1dsc-v2Version - DSC v2dsc-v3Version - DSC v3issue-doc-bugIssue - error in documentation

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions