Share via


How to import the scheduled task using powershell script

Question

Wednesday, May 8, 2013 12:20 PM

Hello Experts,

I have an scheudled task (XML) which needs to be deployed on multiple computer as a scheduled task.

Is it possible to import that scheduled task using powershell ?

Thanks,

_Prashant_

MCSA|MCITP SA|Microsoft Exchange 2003 Blog - http://prashant1987.wordpress.com Disclaimer: This posting is provided AS-IS with no warranties/guarantees and confers no rights.

All replies (2)

Wednesday, May 8, 2013 12:24 PM ✅Answered

have you seen http://www.petri.co.il/import-scheduled-tasks-powershell.htm

Register-ScheduledTask -Xml (get-content '\\chi-fp01\it\Weekly System Info Report.xml' | out-string) -TaskName "Weekly System Info Report" -User globomantics\administrator -Password P@ssw0rd –Force

Wednesday, May 8, 2013 1:13 PM ✅Answered

And here is another solution presented in this very forum only recently (more precisely two solutions, one by Mjolinor using Get-Scheduled and the TaskScheduler GUI and another solution by the OP of that thread using schtasks.exe).

wizend