My scripts to use Chocolatey in a school.
Your public IP will get banned if 100s of computers are downloading nupkg files from chocolatey.org, so we'll need a local repo. Easiest thing is just a shared drive.
-
Get the install script from https://chocolatey.org/docs/installation#completely-offline-install It starts with
# Download and install Chocolatey nupkg from an OData (HTTP/HTTPS) url such as Artifactory, Nexus, ProGet (all of these are recommended for organizational use), or Chocolatey.Server (great for smaller organizations and POCs)
and save it as ChocolateyLocalInstall.ps1 -
Create a read only share, with 3 folders, files, config, packages. Optionally set up a log share.
-
Download packages from https://chocolatey.org and put them in packages folder Create xml files (some examples provided) to config which computers get which packages
-
Put the ps1 and bat files in files folder
-
Make the computers install install.bat on startup
choco-outdated.ps1
is a script to be run by the Administrator, it compares the version numbers of nupkg files in your local repo to those on the chocolatey website, and if there's a newer version, downloads it to the working directory. The Administrator can then copy the new nupkg files to the local repo.