Windows 10: Can't delete Windows Scheduled Task from command line

Discus and support Can't delete Windows Scheduled Task from command line in Windows 10 Customization to solve the problem; I have a PC with two accounts, one with admin privileges and one without. When in the non-admin account, I create a scheduled task with the following... Discussion in 'Windows 10 Customization' started by Jamie Garroch MVP, Jul 23, 2020.

  1. Can't delete Windows Scheduled Task from command line


    I have a PC with two accounts, one with admin privileges and one without.


    When in the non-admin account, I create a scheduled task with the following command:


    schtasks /Create /SC DAILY /ST 07:00 /TN "MyTask" /TR "MyCommand" /F


    This works as expected and creates the task in the root folder, which I can see in the Task Scheduler app.


    When switching accounts to the admin one I try to delete the task as follows:


    schtasks /Delete /TN MyTask


    This returns the following error:


    The specified task name "MyTask" does not exist in the system.


    Yet I can see the task in the Task Scheduler app.


    Why can't I delete it?

    :)
     
    Jamie Garroch MVP, Jul 23, 2020
    #1

  2. Can't delete Windows Scheduled Task from command line

    I have a PC with two accounts, one with admin privileges and one without.

    When in the non-admin account, I create a scheduled task with the following command:

    Code:
    schtasks /Create /SC DAILY /ST 07:00 /TN "MyTask" /TR "MyCommand" /F
    This works as expected and creates the task in the root folder, which I can see in the Task Scheduler app.

    When switching accounts to the admin one I try to delete the task as follows:

    Code:
    schtasks /Delete /TN MyTask
    This returns the following error:

    Code:
    The specified task name "MyTask" does not exist in the system.
    Yet I can see the task in the Task Scheduler app.

    Why can't I delete it?
     
    Jamie Garroch (MVP), Aug 1, 2020
    #2
  3. Execute a command from SCCM Task sequence step "Run a Command line"

    Hi,

    Thanks for your suggestion.

    That will work indeed, however I need to run it from the SCCM Task Sequence's Run Command Line Step and I am not able to figure out how to do that.

    Can we change line while executing command from SCCM Task Sequence's Run Command Line Step?

    Regards
     
    sccm_learner, Aug 1, 2020
    #3
  4. Naki Win User

    Can't delete Windows Scheduled Task from command line

    GPU-Z what command line parameter ?

    Suggestion: /? (-?) and /help (-help) command-line arguments to show a list of all possible arguments in a small window. *Smile Can't delete Windows Scheduled Task from command line :)
     
    Naki, Aug 1, 2020
    #4
Thema:

Can't delete Windows Scheduled Task from command line

Loading...
  1. Can't delete Windows Scheduled Task from command line - Similar Threads - Can't delete Scheduled

  2. Can't delete task in Task Scheduler

    in Windows 10 Gaming
    Can't delete task in Task Scheduler: I'm trying to prevent Facebook Messenger from automatically starting. I already tried asking this in reddit.In the Task Scheduler Task Schedular > Task Scheduler Library > Meta folder, I delete the Messenger-WSP-Helper* task. However, the task keeps reappearing after I delete...
  3. Can't delete task in Task Scheduler

    in Windows 10 Software and Apps
    Can't delete task in Task Scheduler: I'm trying to prevent Facebook Messenger from automatically starting. I already tried asking this in reddit.In the Task Scheduler Task Schedular > Task Scheduler Library > Meta folder, I delete the Messenger-WSP-Helper* task. However, the task keeps reappearing after I delete...
  4. Deleted task scheduler task

    in Windows 10 Gaming
    Deleted task scheduler task: Hi,I Accidentally deleted StartComponentCleanup in Task Scheduler. Is it possible to recover or re-create the deleted task? https://answers.microsoft.com/en-us/windows/forum/all/deleted-task-scheduler-task/0866d10b-9ef7-4bb7-8f0a-56b848500fa9
  5. Deleted task scheduler task

    in Windows 10 Software and Apps
    Deleted task scheduler task: Hi,I Accidentally deleted StartComponentCleanup in Task Scheduler. Is it possible to recover or re-create the deleted task? https://answers.microsoft.com/en-us/windows/forum/all/deleted-task-scheduler-task/0866d10b-9ef7-4bb7-8f0a-56b848500fa9
  6. Deleted task scheduler task

    in Windows 10 Customization
    Deleted task scheduler task: Hi,I Accidentally deleted StartComponentCleanup in Task Scheduler. Is it possible to recover or re-create the deleted task? https://answers.microsoft.com/en-us/windows/forum/all/deleted-task-scheduler-task/0866d10b-9ef7-4bb7-8f0a-56b848500fa9
  7. Why would a script run from the command line but not in Task Scheduler?

    in Windows 10 Ask Insider
    Why would a script run from the command line but not in Task Scheduler?: It's a Python script and it runs perfectly from a cmd prompt but returns an 0x1 error in Task Scheduler. The path to Python is correct. The path to the script is correct. The Task is running under my name with admin permissions. A search hasn't turned-up anything relevant...
  8. Why does Task Scheduler task return 0x1 error but work fine from command line?

    in Windows 10 Ask Insider
    Why does Task Scheduler task return 0x1 error but work fine from command line?: I have a script that runs fine from the command line. When it runs from Task Scheduler using the same user account it returns a 0x1 error. I've been trying to debug it for several days now to no avail. What are some reasons it might be doing this? Screen captures submitted...
  9. Create an advanced Scheduled Task from the Command Line

    in Windows 10 BSOD Crashes and Debugging
    Create an advanced Scheduled Task from the Command Line: Hello. I'm trying to create a scheduled task to run a batch file on Windows 10 using either the command prompt or Powershell. When I create the task with the Task Scheduler GUI, it works perfectly. However, when I try to re-create that same task with the command line, there...
  10. Run a scheduled task via command line via command line

    in Windows 10 Support
    Run a scheduled task via command line via command line: i want start a Run a scheduled task via command line like this: Code: %SystemRoot%\system32\taskschd.msc /Run /TN "RegIdleBackup" when i run the cmd in the prompt as admin the shedular task GUI pop up but the task not start. Is there a solution? Is the...