lunedì 10 dicembre 2012

Convert scheduled jobs from XP / W2003 to W7 / W2008 Server

If you need to convert some scheduled jobs from XP to W7 or from Windows Server 2003 to Windows Server 2008 there is this interesting way I found on this blog:
http://simonhampel.com/how-to-convert-scheduled-tasks-from-windows-xp-to-windows-7/

This is how to do it:
On the W2008 / W7 machine open a console prompt with administrative rights and write this:

schtasks /Query /S remote_computer_name /XML > output_file.xml

if you don't have rights on the remote machine you need to specify user/password:

schtasks /Query /S remote_computer_name /U remote_username /P remote_password /XML > output_file.xml

What you obtain is a file, output_file.xml containing all the scheduled tasks from the remote machine.

You cannot import directly this file into the W2008/W7 machine, because it contains all the taks, the import process is expecting a single task instead.

With a copy and paste process you need to create one file for every task you want to import.
This is quite simple, you need to copy and paste from <task> to </task> to a new xml file:

<Task version="1.1" ...>
...
...
</Task>

Then you need to go to the W2008 / W7 machine, scheduled tasks, right click, "Import...", select the file/s you just created and the task is imported.




Nessun commento:

Posta un commento