Windows Daily Software Upgrade

Contributor Covenant License: MIT

Update Windows software daily with PowerShell, Chocolatey, and Task Scheduler

Developers work hard so we can be lazy (about the boring tasks). :)

Level 1 - Keeping Software Current Manually

Chocolatey offers a convenient way to install software packages. To upgrade all, open a PowerShell window and run:

choco upgrade all -y
refreshenv

Level 2 - Don’t Type, Script

Avoid typing (as easy as it is), by creating a PowerShell script named daily.ps1.

Clone (or fork and clone) this repo down to your local machine. Open a PowerShell as Admin in this folder and run:

.\daily.ps1

Alternatively, create a DOS command to run PowerShell and call the script from anywhere. Open a Windows Command Window as Administrator (hit Windows Start key, type CMD, then click the menu option to run as Administrator) in this folder and run:

PowerShell -File ".\daily.ps1"

Now use Windows Explorer to get the full path to your script and test the command. For example (replace with your path):

PowerShell.exe -NoExit -File "C:\Users\dcase\Documents\denisecase\windows-daily-software-upgrade\daily.ps1"

Verify the command is correct before continuing.

Level 3 - Schedule the Script Manually

Be sure to use your path in the arguments below:

  1. Open Task Scheduler by hitting Windows Start key, and typing Task Scheduler until it appears. Click to open.
  2. In Actions Pane, click ‘Create Basic Task’.
  3. In Name, type “_Daily Choco Upgrade”, click ‘Next’.
  4. Daily is selected, so click ‘Next’.
  5. Set Start time, e.g., 8:00:00 AM, click ‘Next’.
  6. ‘Start a program’ is selected, so click ‘Next’.
  7. In Program/script:, type PowerShell.exe.
  8. In Add arguments (optional), type -NoExit -File "C:\Users\dcase\Documents\denisecase\windows-daily-software-upgrade\daily.ps1"
  9. Click ‘Next’.
  10. Click ‘Finish’.

Level 4 - Explore Scheduled Tasks

You can access the scheduled task to delete it, change the scheduled time, or make other modifications.

See Also