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 https://github.com/PowerShell/PackageManagementProviderResource might be what you’re looking for. Or if you want a Chocolatey package, perhaps https://github.com/PowerShellOrg/cChoco .
Thanks Dave 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 cChoco-master.zip from:
https://github.com/PowerShellOrg/cChoco - then I renamed it cChoco_18.104.22.168.zip,
moved it to:
…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!