Survey: PowerShell DSC Composite Resources

While at the PowerShell Conference EU, we had some very good discussions around PowerShell and PowerShell DSC. A few questions came up about DSC composite resources and how they are being used. DSC composite resources are essentially configurations packaged as resource modules. The benefit is that you can discover them like other DSC resource modules and use them like that. There is a good overview and information on authoring Composite resources on MSDN. So, if you are completely new to this concept, I suggest you read the article first before proceeding.

TL;DR: If you already know about what DSC composite resources are and how they work, We would like to understand a few aspects around composite resources. Here is a small survey for you:

In the folowing example, I am using the ServiceSet composite resource that comes with Windows Server 2016 TP4.


Instead of specifying multiple instances of Service resource, we can use the ServiceSet to configure multiple services that need to be configured in a similar way. Here is an example of the configuration that uses ServiceSet composite resource.

Once you enact this configuration and use the Get-DscConfiguration cmdlet, you will see that the ServiceSet resource gets expanded into the two Service resource instances defined in the configuration.

Now, for some people, this may not make sense. In the configuration script, we have only one resource but in the Get-DscConfiguration output, we have two service instances. This can be confusing at times. The same applies to the Test-DscConfiguration cmdlet as well.

You can identify the resource instances that belong to the composite resource configuration using the InstanceName property. However, it is not always desired.

Instead of this expansion, it will be helpful if the Get and Test methods roll-up the status of the resource instances from the composite resource configuration into a single instance.

So, here is a survey for you. Vote it up and let the team know what your preference is.

About the author: Ravikanth C

Ravikanth is the founder and editor of the PowerShell Magazine. He is also a PowerShell MVP who works at Dell Inc. He blogs at and you can follow him on Twitter @ravikanth.

Related Posts