Install Chocolatey on all Domains Computers PS
-
I just worked on this small but useful script if you have a domain and need to install chocolatey remotely. Make sure that WinRM is enabled on all the computers prior to running it and that your computer has RSAT installed. If you have more efficient ways, please let me know.
Import-Module ActiveDirectory $Computers = Get-ADComputer -Filter * | Select-Object -ExpandProperty Name ForEach ($computer in $Computers) { Invoke-Command -ComputerName $Computer -ScriptBlock { Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) } }
-
It'll be a year since I've done it, but at that time I just made sure the files copied on to every computer. Not sure what else the powershell script does except for set an environment variable
-
@flaxking said in Install Chocolatey on all Domains Computers PS:
It'll be a year since I've done it, but at that time I just made sure the files copied on to every computer. Not sure what else the powershell script does except for set an environment variable
It does the install. No need to download Chocolatey, this runs the installer from the web.
-
@dbeato said in Install Chocolatey on all Domains Computers PS:
If you have more efficient ways, please let me know.
I use Ansible to install Chocolatey on windows machines. You need to set them up so Ansible can manage them, it's a well documented process though. Ansible docs have all the info for that. Now any playbook or role that invokes win_chocolatey module will install Chocolatey if missing. Here's a sample:
--- - hosts: all tasks: - name: Upgrade all software win_chocolatey: name: all state: latest
-
How fast does chocolatey get update for things like Adobe Flash?
-
@aaronstuder said in Install Chocolatey on all Domains Computers PS:
How fast does chocolatey get update for things like Adobe Flash?
Depends on how quickly Adobe rolls them out. It's Adobe in that case, not Chocolatey, that is the deciding factor.
-
@scottalanmiller said in Install Chocolatey on all Domains Computers PS:
@aaronstuder said in Install Chocolatey on all Domains Computers PS:
How fast does chocolatey get update for things like Adobe Flash?
Depends on how quickly Adobe rolls them out. It's Adobe in that case, not Chocolatey, that is the deciding factor.
Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.
-
@dustinb3403 said in Install Chocolatey on all Domains Computers PS:
Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.
Exactly. How long does that take?
-
@aaronstuder said in Install Chocolatey on all Domains Computers PS:
@dustinb3403 said in Install Chocolatey on all Domains Computers PS:
Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.
Exactly. How long does that take?
This depends, on if the maintainer is actually looking g out for updates and pushing them through.
With ShareX the original maintainer disappeared, so the chocolatey team took over it. It took about a month for that transition. Because they were attempting to get the software developer to maintain the chocolatey repo.
-
@aaronstuder said in Install Chocolatey on all Domains Computers PS:
@dustinb3403 said in Install Chocolatey on all Domains Computers PS:
Not quite true, the chocolatey maintainer needs to update the chocolatey repo as well.
Exactly. How long does that take?
As long as each vendor decides. You'd have to monitor Adobe Flash releases, monitor their releases on Chocolatey and use that to guess what the future will be like.
Flash is dead, so I doubt any one is paying attention to it. Those that need it get a secure version built into Chrome. I can't remember the last time I installed (or used) Flash.
But it 100% comes down to "how much faith do you have in Adobe's release procedures."
-
@aaronstuder said in Install Chocolatey on all Domains Computers PS:
How fast does chocolatey get update for things like Adobe Flash?
Probably faster that if you did it manually. It depends on maintainer, but most popular packages are updated quickly.
-
The specific package
adobereader
is a horrible example though.Because until this month, you installed
adobereader-update
which also installedadobereader
first as part of the package.But now, suddenly,
adobereader
is all that is needed.adobereader history.
adobereader-update history.