This script is pretty simple. It pulls the variables from dropdowns. To separate applications, they must be listed like app1;app2;app3. Recently I started getting an error but only on the first run. If I run it again, it goes through fine.
Could not find a command registered that meets ‘adobereader;firefox;googlechrome’.
Try choco -? for command reference/help.
Installing the following packages:
By installing, you accept licenses for the packages.”
The second time, it installs everything properly. It’s like the first time, it is not passing the $action variable through since Choco believes the command is actually what is listed in the $app variable. Install is the default $action variable and I verified twice now when this happened that install was listed when I ran it.
Import-Module $env:SyncroModule choco $action $app -y -f $packages = choco list -l -r --idonly Write-Output $packages Set-Asset-Field -Name "Installed Choco Packages" -Value $packages