Testing custom DSC Resources
There are a few methods available to you to test the custom DSC Resources you have created, whether they are PowerShell v4- or v5-based.
Using xDscResourceDesigner
We covered using xDscResourceDesigner
in the previous section on creating module-based DSC Resources, but automating DSC Resource creation is not the only trick up this module's sleeve. The two Cmdlets, Test-xDscResource
and Test-xDscSchema
, provided by this module aid in testing your custom DSC Resources.
Test-xDscResource
and Test-xDscSchema
will check your custom DSC Resource to make sure that the data types are the same between your DSC MOF schema file and your DSC PowerShell script Get
, Set
, and Test-TargetResource
functions, that the mandatory parameters ...
Get Learning PowerShell DSC now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.