The command: "SCHTASKS /Delete /?" is on Windows 11, 10, .. available
Here are examples of using the
`SCHTASKS /Delete` command to delete a scheduled task:
Example 1: Delete simple scheduled task:
SCHTASKS /Delete /TN "MyTask"
This command deletes the scheduled task named MyTask on the local computer.
Example 2: Delete scheduled task on a remote computer:
SCHTASKS /Delete /S "RemoteComputer" /U "AdminUser" /P "AdminPassword" /TN "MyTask"
Here the scheduled task named
"MyTask" is deleted on the remote computer
"RemoteComputer". The credentials (
`/U` and
`/P`) for execution on the remote computer are specified.
Example 3: Delete scheduled task and unlink all related tasks:
SCHTASKS /Delete /TN "MyTask" /F
The
`/F` parameter is used to force the scheduled task to be deleted without displaying a confirmation. This is useful if you are sure you want to delete the task.
Hints:
- The
`/TN` parameter is used to specify the task path or task name. Replace
"MyTask" with the actual name or path of your scheduled task.
- The
`/S` parameter is used to specify the remote computer. Replace
"RemoteComputer" with the actual name or IP address of the remote computer.
- The
`/U` and
`/P` parameters are used to specify the credentials for running on a remote computer.
These examples are intended to give you an idea of ??how the
`SCHTASKS /Delete` command can be used in different scenarios. Depending on your specific requirements, the parameters may vary. Use
`SCHTASKS/?` for a complete list of options and parameters. Note that deleting a scheduled task can have an immediate impact, so you should ensure that the task is properly selected.