Custom DSC Resources and Parameter Sets

This topic contains 2 replies, has 2 voices, and was last updated by  Josh Henne 4 months, 1 week ago.

  • Author
    Posts
  • #72706

    Josh Henne
    Participant

    Hello,

    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.

    Thanks,

    Josh

  • #72707

    Don Jones
    Keymaster

    Nope.

    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

    Josh Henne
    Participant

    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.

You must be logged in to reply to this topic.