Is there a command to create a Schedule task folder in Windows 2008? I am trying to use SchTasks.exe to create the tasks and would like to put these tasks under a task folder. Essentially, inside task scheduler, add a new folder and add multiple tasks underneath the folder. From UI there is an option to create a folder but not sure about command reference
Thanks in advance
From the Start menu, select Administrative Tools > Task Scheduler. Under Task Scheduler (Local), select Task Scheduler Library and choose New Folder from the Actions panel. Enter Datacap and click OK.
Schtasks.exe - Win32 appsEnables an administrator to create, delete, query, change, run, and end scheduled tasks on a local or remote computer.
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. Specifies the password of the user account specified in the /u parameter.
few trials and solved the problem; the key is using "\" in the task name. Sample schtask.exe command line,
schtasks /create /xml "MyTask.xml" /tn "My Task Folder\My New Task"
creates a new task folder My Task Folder and creates a new task My New Task under the new folder
If the task needs to get created under an existing folder, try
schtasks /create /xml "MyTask.xml" /tn "Existing Task Folder\My New Task"
creates a new task My New Task under an existing task folder Existing Task Folder
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With