Custom DSC Resources and Parameter Sets

Welcome Forums DSC (Desired State Configuration) Custom DSC Resources and Parameter Sets

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

1 year, 7 months ago.

  • Author
  • #72706

    Points: 0
    Rank: Member


    Regarding custom DSC resources, is it legal to use multiple parameter sets? An example would be a resource for a package I want to install which could either be hosted on a local file share or downloaded from a URI. Within a configuration, I would want to specify either the share or the URI.



  • #72707

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


    You can have optional parameters, though. You could have "UNC" and "URI" and just figure out which one was specified. But there's no way to enforce someone using one or the other.

    Or, just specify a "source" property, and figure out for yourself if it's a UNC or a URI. That'd be the friendly thing to do.

  • #72710

    Points: 0
    Rank: Member

    Thanks Don! That clears things up. I'll keep just the URI parameter and use one of the built-in resources for systems that don't have internet access.

The topic ‘Custom DSC Resources and Parameter Sets’ is closed to new replies.