Debug Custom DSC resource functions

This topic contains 1 reply, has 2 voices, and was last updated by Profile photo of Don Jones Don Jones 3 years, 1 month ago.

  • Author
  • #14860
    Profile photo of Jeff Pflum
    Jeff Pflum

    I am new to DSC, and PowerShell, so I apologize if the answer is obvious...

    I have started to write a custom resource that uses the Get-WebConfigurtionProperty and Set-WebConfigurationProperty contained in the IIS 7 WebAdministration module. How can I go about testing the Get-TargetReource, Set-TargetResource, and Test-TargetReource functions without actually using them as part of a Configuration? Thanks...

  • #14863
    Profile photo of Don Jones
    Don Jones

    I usually build these as "normal" modules, and name them Get-DonTargetResource, etc. That way I can run them standalone to test and debug. It's easy to rename them and rearrange the module files when I'm ready for it to be a resource.

You must be logged in to reply to this topic.