powershell 2.0 import task from win server 2003 schtasks /query /fo csv
-
17-06-2021 - |
Pergunta
I need to export the task list from a windows 2003 server to 2008. I used schtasks /query /fo csv to export the tasks into a csv file from the 2003 host.
Now I need to find out how to import the tasks to the 2008 server. I found a couple of posts here but they were not very relevant because I am using Powershell 2.0 and I don't have any extra powershell module available nor I'm allowed to make any change on the powershell configuration either.
Does anyone know how can I import the task to the 2008 machine ?
Here's an example of what the tasks look like in the csv file :
"TaskName","Next Run Time","Status"
"backup_task","12:00:00 AM, 6/29/2012",""
"backup_task_montly","2:00:00 AM, 6/30/2012",""
"backup_task_weekly","1:00:00 AM, 7/1/2012",""
Thanks for your help!
Solução
Have you tried working with the scheduler directly through COM objects? Here's an article I've referenced in the past for some sample code.
http://www.send4help.net/syncing-scheduled-tasks-with-powershell-901