(904) 284-4480

Choco Upgrade Script

Scheduled Job for Choco upgrade all

General

  1. Create a scheduled job named Chocolatey Upgrade All
  2. Run Weather User Logged in or not
  3. Run with highest privledges

Triggers

  1. Weekly at 3:00pm every Sunday

Actions

  1. Start a program
  2. Details – powershell.exe
  3. Add arguments – 
				
					-noprofile -ExecutionPolicy Bypass -file C:\Scripts\choco-upgrade-packages.ps1
				
			

Conditions

  1. Wake the computer to run this task

Settings

  1. Allow task to be run on demand
  2. Stop the task if it runs longer than 1 day
  3. If the running task does not end when completed, force it to stop
  4. If task is already running, do not start a new instanace

History

  1. Enable History

Create ps script called choco-upgrade-packages.ps1

Add the folllowing code

				
					choco upgrade all -y