大网数据广告活动
Windows排障命令

schtasks delete

· 52CE 我爱测

Reference article for the schtasks delete command, which deletes a scheduled task from the schedule.

Deletes a scheduled task from the schedule. This command doesn't delete the program that the task runs or interrupt a running program.

Syntax

schtasks /delete /tn {<taskname> | *} [/f] [/s <computer> [/u [<domain>\]<user> [/p <password>]]]

Parameters

Parameter Description
/tn `{<taskname> *}`
/f Suppresses the confirmation message. The task is deleted without warning.
/s <computer> Specifies the name or IP address of a remote computer (with or without backslashes). The default is the local computer.
/u [<domain>] Runs this command with the permissions of the specified user account. By default, the command runs with the permissions of the current user of the local computer. The specified user account must be a member of the Administrators group on the remote computer. The /u and /p parameters are valid only when you use /s.
/p <password> Specifies the password of the user account specified in the /u parameter. If you use the /u parameter without the /p parameter or the password argument, schtasks will prompt you for a password. The /u and /p parameters are valid only when you use /s.
/? Displays help at the command prompt.

Examples

To delete the Start Mail task from the schedule of a remote computer.

schtasks /delete /tn "Start Mail" /s Svr16

This command uses the /s parameter to identify the remote computer.

To delete all tasks from the schedule of the local computer, including tasks scheduled by other users.

schtasks /delete /tn * /f

This command uses the /tn * parameter to represent all tasks on the computer and the /f parameter to suppress the confirmation message.

Related links

Source: Microsoft Learn / Windows Server documentation by Microsoft and contributors (upstream author metadata: robinharwood). Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Server documentation
适用范围
Windows Server · Source date 09/16/2020
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。