Monday, 15 August 2011

How to Export Scheduled Tasks on Windows Server 2003

If you need to export your scheduled tasks from Windows, like I have just needed to, use this from the command prompt:

schtasks /query /FO CSV /V >sched_tasks.csv

This will output to a comma-delimited file with all the tasks in it to the current folder called sched_tasks.csv.

5 comments:

  1. Is there a command to import the sched_tasks.csv?

    ReplyDelete
    Replies
    1. I'm not aware of way to import using the schtasks command I'm afraid :(

      You may find it easier to export the tasks as XML (using the Task Scheduler) and then importing the XML file using the Task Scheduler.

      Delete
  2. I believe the "Task Scheduler" is a Win2008 thing, and this question pertains only to 2003. I haven't been able to find a way to import, other than constructing a series of commands using
    >schtasks /create
    but the syntax is a beeyatch!

    ReplyDelete
  3. Can you create a loop, so it looks through a list of servers and returns all Schedule Tasks?

    ReplyDelete