I have some tasks in the Task Scheduler on Windows 2008 R2. I created them as the admin and I'm logged in as the admin. I have no easy way to rename the tasks. The only way I can is to export the task config to a XML file and re-import to a new task, change the name there, then delete the old task. Is there an easier way?
Congratulations! You've come up against a problem that has stumped many a Windows user/admin. No, you cannot rename a task except for exporting, renaming and importing again. Yes, it's rather silly. Perhaps an enterprising scripter could create a simple PowerShell script that automates this, but until then, you're stuck with your export/import two-step. Sorry. =(
(You also can't rename a task folder after you've created it.)
Not the best way but can be a life saver.
Tasks are stored in
C:\Windows\System32\Tasks in XML format importable using
schtasks.exe. As Weasly told, renaming the file doesn't work but Create/Delete will. That said, you need the running user password (that you have)
Compared to Weasly's suggestion, it just skips the export phase.
- create a second task using the first as template
- remove the original
dstname and an admin shell in Tasks folder:
C:\Windows\System32\Tasks>schtasks /Create /tn dstname /xml srcname /ru [running username] /rp [password] SUCCESS: The scheduled task "dstname" has successfully been created. C:\Windows\System32\Tasks>schtasks /delete /tn srcname /f SUCCESS: The scheduled task "srcname" was successfully deleted.
- With a little bit of scripting, you can rename a large bunch of tasks without effort
- If needed you should be able to extract the original RU from the XML (in node
- If you want schtasks to ask for the password, simply remove
Unfortunately not. That's the way this is done now. I believe it's for security purposes, so that set tasks cannot be modified while they are actually setup and enabled.
Please be sure before you answer "Cannot do this", "Impossible", etc.
Check out this power shell script.
One possibility is, to export the task, delete the task, rename the file and import it again.
A good description can be found here: Rename task in task scheduler
Yes it's possible ! Just export the task (right click on the task / Export...) as an XML file (on the Desktop for instance). Then, delete the task in the Tasks Scheduler and right click / Import a task. Choose the previously saved XML file, rename the task and save it. Voila.