Search code examples
powershelldsc

Installing a dependent resource from PS Gallery


How do I tell DSC that a resource/module from OneGet/Package Management needs installing, first?

Do I just use a Script Resource and configure PowerShellGet and then manually call Install-Module?


Solution

  • you could use powershell remoting and install the modules beforehand.

    or

    you could use a script resource

    or

    use this module from github powershellmodule

    if you have a pull server you can use the github module centrally otherwise when using push you will have to copy the github module referenced above to all target systems but then it is a one time process at least for installing modules from the gallery.