Export a Task
Applies To: Windows 7, Windows Server 2008 R2, Windows Server 2012, Windows Vista
You can export a task so that the task is stored in an XML file which can be imported by other users and computers. A task's properties, triggers, actions, conditions, and settings are represented in an XML file. A task's XML is defined by the Task Scheduler Schema. For more information about importing tasks, see Import a Task.
To export a task by using the Windows interface
If Task Scheduler is not open, start Task Scheduler. For more information, see Start Task Scheduler.
Find and click the task folder in the console tree that contains the task you want to export.
In the console window, click the task that you want to export.
In the Actions pane, click Export… . The Save As dialog box will appear.
In the Save As dialog box, browse to the location that you want to save the task, and click the Save button.
To export a task by using a command line
Open a command prompt. To open a command prompt, click Start , click All Programs , click Accessories , and then click Command Prompt .
schtasks /Query [/S <system> [/U <username> [/P [<password>]]]] /XML /TN <taskname>
The XML for the task is shown in the command prompt. Copy the XML for the task and paste it into a blank XML file. When the XML file is saved, the file will contain the task definition and can be imported.
To view the help for this command, type:
schtasks /Query /?