How to use Chocolatey to Install Software remotely on multiple computers

In a previous video I used just PowerShell to install software remotely. In this video I show you how to use the Chocolatey packager manager to install packages (software) from the chocolatey repository on multiple computers simultaneously using a single function.

Be careful what packages you’re downloading, there are some security features built-in the chocolatey repo, but this may not be the solution for an enterprise environment. I use this to overlay software on top of lab VMs that I build and rebuild on a regular basis. In that case I’m not so concerned about the security aspect as I might be in a standard enterprise. There is a paid enterprise version of chocolatey that enables you to stand up a local repo and use chocolatey to rollout packages from the local repo, which would be a better enterprise solution in my mind.

Here is the Chocolatey install script:

1# Install Chocolatey
2Invoke-Command -ComputerName DC -ScriptBlock {
3    Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
4    choco feature enable -y allowGlobalConfirmation
5    }

Here is the Function to install the packages remotely: