Exporting Scheduled Tasks Using PowerShell

If you need to rapidly export all the currently scheduled tasks for re-import on another machine, the following can be used to do that.

$TaskList = (Get-ScheduledTask)
foreach ($Task in $TaskList){
Export-ScheduledTask -TaskName "$($Task.TaskName)" -TaskPath $($Task.TaskPath) | Out-File "C:\Tasks\$($Task.TaskName).xml"
}