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

 
Participant
1 year, 4 months ago.

  • Author
    Posts
  • #72706

    Participant
    Points: 0
    Rank: Member

    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

    Keymaster
    Points: 1
    Rank: Member

    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

    Participant
    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.