Invoke-DSCResource on WindowsFeatureSet fails
As subject says. Example is below
PS C:\Windows\system32> Invoke-DscResource -Name WindowsFeatureSet -Property @{Name = "Storage-Services"; Ensure = "Present" } -Method test -ModuleName PSDesiredStateConfiguration
Invoke-DscResource : Failed to serialize properties into CimInstance.
At line:1 char:1
+ Invoke-DscResource -Name WindowsFeatureSet -Property @{Name = "Storag ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Invoke-DscResource], SerializationException
+ FullyQualifiedErrorId : System.Runtime.Serialization.SerializationException,Microsoft.PowerShell.DesiredStateConfiguration.C
ommands.InvokeDscResourceMethodCommand

Thanks for the feedback! Based on its current ranking compared to other feedback items and product schedule, work on this item is pending (and will be driven by) further customer input. If you did not open this issue and are also impacted by it, please vote this item up.
MarkG
4 comments
-
Stu commented
Hi @MarkGray I find composite resources to be a convenient way to abstract functionality, coming from "pure DSC" I use it a lot of manage larger configurations.
Switching over to use ansible, because this uses Invoke-DscResource, I'm not able to directly re-use these abstractions.
I'm not hugely impacted, just a bit of refactoring. Thought I'd mention the potential use-case (and maybe someone else will come here wondering why their resources aren't working!)
-
Steve Murawski commented
@gregory - As to why it is marked Survey - https://blogs.msdn.microsoft.com/powershell/2016/05/09/understanding-the-powershell-uservoice/
And why Invoke-DscResource can't use composite resources - https://discourse.chef.io/t/dsc-resource-will-not-work-with-composite-resources/8443/2?u=steven_murawski
-
Gregory Suvalian commented
why is is this marked as "Survey" instead of "bug"?
-
Gregory Suvalian commented
This seems to affect all composite resources in PSDesiredStateConfiguration module
Invoke-DscResource -Name ProcessSet -Property @{Name = "notepad.exe"; Ensure = "Present" } -Method Get -ModuleName PSDesiredStateConfiguration