Not able to create DSC Composite Resource

24 Views Asked by At

I am trying create a composite resource on Windows Server 2022.

Now, I am following the example given in http://4syops.com/archives/how-to-create-a-composite-powershell-dsc-resource/

I am not sure whether I am doing anything wrong or the instructions are.

It says in one of the steps to add the resource you wish to create into a file called DefaultServer.psm1.

Now if you go to the next step it fails and says DefaultServer is not recognized as the name of a Resource. However, if you move the resource into the DefaultServer.schema.psm1, then this step will work, but then fails on the next as step with the error PSDesiredStateConfiguration\Node: the term 'DefaultServer' is not recognized as the name of a cmdlet, function, script, or operable program.

Can someone please help me as how to create a simple DSC Resource and deploy it?

0

There are 0 best solutions below