Featured post

Automation | Powershell scripts

Automation | Powershell scripts Xenapp 6.5 Health check script XenAppServerHealthCheck Report through Script  ## XenAppServerHealthCheck ## ...

Wednesday, 5 December 2018

Migrate scheduled tasks from 2003 to 2008, 2008r2 & 2012r2

Migrate scheduled tasks from 2003 to 2008, 2008r2 & 2012r2

Some time you have to migrate a task or a bunch of them from one computer to another. In my case, it was even more “interesting” task: migrate some tasks from Windows Server 2003 box to Windows 2008 R2. If you have only one it is no problem to move it manually, but what if there are many of them? Here it is the moment of schtasks’ triumph! =)
What it can do for us is to export 2003’s tasks into an XML file. Suppose we have task “Command Prompt” which launches cmd.exe once:
Now let’s use our secret weapon (run it from 2008 box):
Schtasks /query /S remote_pc_name /tn “Command Prompt” /XML > C:\Temp\task.xml
In Task.xml we now have the content and task.
which we can now import to our W2008R2 box with schtasks or even through GUI:
Of course, doing that with schtasks is the more efficient way to import more than one task, but GUI is much more spectacular

No comments:

Post a Comment