Debug Custom DSC resource functions

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

  • Author
    Posts
  • #14860

    Jeff Pflum
    Participant

    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

    Don Jones
    Keymaster

    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.