Has anyone got Scheduled Tasks to actually work in the latest Windows Admin Center? I'm just trying to run a very simple Powershell script that cleans up files in one directory on our servers. This script and task ran fine for years on our 2016 servers. I'm following this article: https://techdirectarchive.com/2020/03/26/how-to-create-a-scheduled-task-with-windows-admin-center/. There's not much else info out there about using Scheduled Tasks in WAC.
Relevant task settings I have:
Triggers: Daily, at 11 PM
Actions: Start a Program
Security: Use built-in account, SYSTEM
Stop task if it runs longer than 2 hours.
The status is always "task terminated by user". I'm assuming it's hitting the 2 hour limit. The script is just to clean up files older than 7 days in one directory, and currently there are only a couple files older than 7 days, so the script should run in seconds. I've made several tweaks to the task, but nothing has worked. I've checked event viewer and didn't see any helpful messages. The script runs fine via WAC Powershell, so I know nothing is wrong with it.