Scheduled Job for Choco upgrade all
General
- Create a scheduled job named Chocolatey Upgrade All
- Run Weather User Logged in or not
- Run with highest privledges
Triggers
- Weekly at 3:00pm every Sunday
Actions
- Start a program
- Details – powershell.exe
- Add arguments –
-noprofile -ExecutionPolicy Bypass -file C:\Scripts\choco-upgrade-packages.ps1
Conditions
- Wake the computer to run this task
Settings
- Allow task to be run on demand
- Stop the task if it runs longer than 1 day
- If the running task does not end when completed, force it to stop
- If task is already running, do not start a new instanace
History
- Enable History
Create ps script called choco-upgrade-packages.ps1
Add the folllowing code
choco upgrade all -y