System administrators often need to gather scheduled task information. To accommodate this need, Jim Turner has written GetSchTasks.vbs. This script uses Schtasks.exe—the command-line interface for Task Scheduler—to gather scheduled task data from all the computers in a given organizational unit (OU).
GetSchTasks.vbs uses the WScript.Shell object in Windows Host Script (WSH) to run Schtasks.exe. For each computer in the OU, the script writes the scheduled task data to a .csv file. The script then writes the data in all the .csv files to a Microsoft Excel spreadsheet.
Although this script works well with Windows XP, Windows Server 2003, and Windows 2000, there are multiple headers interspersed in the output when you use it with Windows Vista and Windows Server 2008. This is due to a glitch that occurs when schtasks.exe is used with Vista and Server 2008. Microsoft is aware of this glitch.
To use GetSchTasks.vbs, your machine needs to be running Windows Management Instrumentation (WMI), WSH, and Excel. You can download the script by clicking the Download the Code Here button at the top of the page. The utility will be available for download indefinitely, so you can download it today, next week, next month, or even next year should you happen to misplace it.
After you download GetSchTasks.vbs, you need to create a folder to house it. In the script, you must customize the QStr variable so that it points to your target OU.