How do I use Install-Package inside a DSC configuration pull?

I would like to have a DSC config that check to see if a package like xFirefox is installed and if not it installs it. Google keeps sending me in circles on this so I was hoping somebody here could point to an example configuration…

The DSC resources in might be what you’re looking for. Or if you want a Chocolatey package, perhaps .

Thanks Dave :slight_smile: I am trying the Choco route and found an article with a DSC config in it:

Trying this however I get squiggley lines under:
Import-DscResource -ModuleName cChcoco

I downloaded from: - then I renamed it,

moved it to:
C:\Program Files\WindowsPowerShell\DscService\Modules

…and finally created a new-dscchecksum for it. Not sure what I’m missing since the Powershell ISE obviously does not see it. Any suggestions?

The ISE needs the module to just be installed on your system (somewhere in $env:PSModulePath). The zip / checksum thing is for a pull server; clients that are configured to use that pull server to obtain resources will download and install modules from there, but that doesn’t affect the machine where you’re authoring the config.

Ah ok thanks! Not keeping track of my modules lol!