Jeff is correct, if there is no 3rd party policy set choco will not be available. As Frank’s solution post says the location is: C:\Program Files\RepairTech\Syncro\kabuto_app_manager\choco.exe Normally ‘choco’ by itself works fine, but it seems it’s not 100% reliable (may be related to using standalone chocolatey, which I do) so I tend to use the full path to be safe, like so:
Hopefully this helps someone. I used the reference above, checked what was set on the PC, then pointed to that choco command directly to the right location after finding what was set that was allowing choco to run locally on the PC. Here is what I ended up with…
This worked for me using Batch run as System. The key for me was to look at what was variable was set on the PC using the set command in the cmd window, then make the path explicit. Perhaps the choco command has moved again in later versions. I hope this helps someone.
I’m very new to chocolatey, but I think there is a lot of potential.
Win-Get isn’t suitable for RMM use since you can’t run it as SYSTEM user. Romanitho (Romain) · GitHub has hacked together a way around this it seems but I haven’t bothered to test it out.
One way around this that I’ve had to use in the past is by installing the RunAsUser module, and then calling Win-Get that way. Works pretty well. Runs everything inside your script block as the user.
Just an additional reminder. Don’t forget to setup internal packages once you get it running to prevent surprises later. It’s probably obvious to those doing this for a while, but probably not as much for those new to automation, especially when most of the work is done for you initially.