From 256be5c2106cd0cb61c419306f245463e617ba27 Mon Sep 17 00:00:00 2001 From: "Michael H.G. Schmidt" Date: Tue, 27 Dec 2022 20:21:29 +0100 Subject: [PATCH] . --- scripts/cleanup-taskscheduler.cmd | 7 ++----- scripts/cleanup-taskscheduler.ps1 | 6 ------ 2 files changed, 2 insertions(+), 11 deletions(-) delete mode 100644 scripts/cleanup-taskscheduler.ps1 diff --git a/scripts/cleanup-taskscheduler.cmd b/scripts/cleanup-taskscheduler.cmd index ee09cb2..149fc6d 100644 --- a/scripts/cleanup-taskscheduler.cmd +++ b/scripts/cleanup-taskscheduler.cmd @@ -3,11 +3,8 @@ set TOOLS=c:\tools echo ####### %0 ####### -echo removing all tasks in the task scheduler ... -schtasks /delete /TN * /F - -echo deleting folders in the task scheduler ... -powershell -command %TOOLS%\scripts\cleanup-taskscheduler.ps1 +echo Disabling all tasks in the task scheduler ... +schtasks /change /TN "*" /DISABLE echo ####### %0 ####### diff --git a/scripts/cleanup-taskscheduler.ps1 b/scripts/cleanup-taskscheduler.ps1 deleted file mode 100644 index 850af89..0000000 --- a/scripts/cleanup-taskscheduler.ps1 +++ /dev/null @@ -1,6 +0,0 @@ - -$scheduleObject = New-Object -ComObject Schedule.Service -$scheduleObject.connect() -$rootFolder = $scheduleObject.GetFolder("\") -$rootFolder.DeleteFolder("\Microsoft",$null) -