check this guys simple batch file, it works on windows 7 without powershell and saves everything as xml and imports back as xml
If you export and import only on a Windows 7 PC, replace the line that has
del tasks\#Microsoft*.xml
from
rem del tasks\#Microsoft*.xml
Scheduled tasks export all
Here is the code if the link goes down
rem @echo off cls setlocal EnableDelayedExpansion set runasUsername=domain\administrator set runasPassword=password if %1. == export. call :export if %1. == import. call :import exit /b 0 :export md tasks 2>nul schtasks /query /fo csv | findstr /V /c:"TaskName" > tnlist.txt for /F "delims=," %%T in (tnlist.txt) do ( set tn=%%T set fn=!tn:\=#! echo !tn! schtasks /query /xml /TN !tn! > tasks\!fn!.xml ) rem Windows 2008 tasks which should not be imported. del tasks\#Microsoft*.xml exit /b 0 :import for %%f in (tasks\*.xml) do ( call :importfile "%%f" ) exit /b 0 :importfile set filename=%1 rem replace out the # symbol and .xml to derived the task name set taskname=%filename:#=% set taskname=%taskname:tasks\=% set taskname=%taskname:.xml=% schtasks /create /ru %runasUsername% /rp %runasPassword% /tn %taskname% /xml %filename% echo. echo.
Sundara prabu
source share