Windows Updates by Boxstarter via Chocolatey

article #1289, updated 1812 days ago

Chocolatey is a great way to get a huge variety of software into your Windows machine in a very consistent way. Boxstarter uses Chocolatey for large repeated OS and package setups, both virtual and hardware. Boxstarter has a great Windows update method inside. To call it all via Powershell, one can do this (make sure you’re administrative):

$PSCred = Get-Credential
Set-ExecutionPolicy Bypass -Force
iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco install boxstarter -y
choco install boxstarter.chocolatey -y
Install-BoxstarterPackage -PackageName Boxstarter.WindowsUpdate -Credential $PScred

The credential is a local admin to the box, it is there so the updater can run through as many reboots as necessary to get the job done. Please do be aware that this will reboot the machine immediately after setup, and will reboot it repeatedly as needed to get the machine fully up to date. It also installs a public desktop icon called “Boxstarter Shell” which probably will need to be removed.

One can copy all of the above lines into a file, e.g., “winup.ps1”, and then run “.\winup” in an administrative Powershell, it will work very nicely.

Categories: