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. 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...
  3. Deleting files with command line

    in Windows 10 Network and Sharing
    Deleting files with command line: I used del filename and it was successfully deleted. I also used dir to double check. However, when I checked the Recycle Bin; the file wasn't found inside. Was this file permanently deleted?...
  4. 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...
  5. Task Manager Command Line Arguments?

    in Windows 10 Customization
    Task Manager Command Line Arguments?: Rather low priority and eccentric inquiry. I'm looking to see if anyone knows of ways to control the launch of Task Manager (taskmgr.exe) with various visual options. In my case *every time* I run TaskMgr I do the following manually, and would love to have it automated...
  6. Windows Command-Line: The Evolution of the Windows Command-Line

    in Windows 10 News
    Windows Command-Line: The Evolution of the Windows Command-Line: Welcome to the second post in this "Windows Command-Line" series. In this post we'll discuss some of the background & history behind the Windows Command-Line. Specifically, we’ll explore its humble origins in MS-DOS, to its modern-day incarnation supporting tools like...
  7. No restore from Seagate. Windows task scheduler can't be started

    in Windows 10 Backup and Restore
    No restore from Seagate. Windows task scheduler can't be started: I am trying to restore a file from a Seagate external drive. The backup seems to be working OK, but when I try to restore, I get a message "Windows Task Scheduler cannot be started. Please check if the Task Scheduler service is active before running a backup job." What do I...
  8. Can't create task in Task Scheduler

    in Windows 10 Support
    Can't create task in Task Scheduler: Whenever I try to create a task in Task Scheduler, an error pops up. [img] I press OK, and this pops up: [img] Here is the transcript: "Unhandled Exception in Managed Code Snap-in FX:{c7b8fb06-bfe1-4c2e-9217-7a69a95bbac4} The system cannot find the...
  9. 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...
  10. Export Task from Task Scheduler in Windows

    in Windows 10 Tutorials
    Export Task from Task Scheduler in Windows: How to: Export Task from Task Scheduler in Windows How to Export a Task from Task Scheduler in Windows [img] Information The Task Scheduler enables you to automatically perform routine tasks on a chosen computer. The Task Scheduler does this by monitoring whatever...