Debug Custom DSC resource functions

Welcome Forums DSC (Desired State Configuration) Debug Custom DSC resource functions

This topic contains 1 reply, has 2 voices, and was last updated by

4 years, 6 months ago.

  • Author
  • #14860

    Points: 0
    Rank: Member

    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

    Points: 1,638
    Helping HandTeam Member
    Rank: Community Hero

    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.

The topic ‘Debug Custom DSC resource functions’ is closed to new replies.