I hadn’t thought about installing multiple programs at once but that does make sense and would make things easier if I work out a ‘standard build’ most of our customers need.
So as a test I spun a Windows 10 test VM and ran the following via our RMM Agent:
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString(‘https://chocolatey.org/install.ps1’))
choco install office365business -y -x86
This worked great and installed Office 365 Business. I added the -x86 flag just for fun.
Only thing I can’t workout is it seems to give the same initial output for the first part regardless whether Chocolatey is installed or not:
"Getting latest version of the Chocolatey package for download.
Getting Chocolatey from https://chocolatey.org/api/v2/package/chocolatey/0.10.13.
Extracting C:\Windows\TEMP\chocolatey\chocInstall\chocolatey.zip to C:\Windows\TEMP\chocolatey\chocInstall…
Installing chocolatey on this machine
Creating ChocolateyInstall as an environment variable (targeting ‘Machine’)
Setting ChocolateyInstall to ‘C:\ProgramData\chocolatey’
WARNING: It’s very likely you will need to close and reopen your shell
before you can use choco.
Restricting write permissions to Administrators
We are setting up the Chocolatey package repository.
The packages themselves go to ‘C:\ProgramData\chocolatey\lib’
A shim file for the command line goes to ‘C:\ProgramData\chocolatey\bin’
and points to an executable in ‘C:\ProgramData\chocolatey\lib\yourPackageName’.
Creating Chocolatey folders if they do not already exist.
WARNING: You can safely ignore errors related to missing log files when
upgrading from a version of Chocolatey less than 0.9.9.
‘Batch file could not be found’ is also safe to ignore.
‘The system cannot find the file specified’ - also safe.
WARNING: Not setting tab completion: Current user is SYSTEM user.
Chocolatey (choco.exe) is now ready.
You can call choco from anywhere, command line or powershell by typing choco.
Run choco /? for a list of functions.
You may need to shut down and restart powershell and/or consoles
first prior to using choco.
Ensuring chocolatey commands are on the path
Ensuring chocolatey.nupkg is in the lib folder
I guess since it says “Creating Chocolatey folders if they do not already exist.” it will just skip over if the folders are there but would be nice if the output indicated that.