如何在没有确认的情况下从命令行删除计划任务? (schtasks删除)

我可以像这样从命令行创build一个任务:

schtasks /create /tn SomeTask /tr "do.bat arg1 arg2" /sc ONCE /st 00:00:00 /sd 01/01/1991 

现在我需要删除它。 但是该命令需要确认,我不知道如何从BATCH文件(bat / cmd)做到这一点。

 C:\> schtasks /delete /tn ContextSwitchTask WARNING: Are you sure you want to remove the task "ContextSwitchTask" (Y/N)? C:\> echo Y | schtasks /delete /tn ContextSwitchTask WARNING: Are you sure you want to remove the task "ContextSwitchTask" (Y/N)? Y ERROR: Invalid input. Type "SCHTASKS /DELETE /?" for usage. 

问题:如何删除计划任务并强制执行?

 C:\> schtasks /delete /tn ContextSwitchTask /f