Hi Jason,
The Win32_ScheduledJob WMI class represents a job created with the AT
command. The Win32_ScheduledJob class does not represent a job created with
the Scheduled Task Wizard from the Control Panel. That's why it produce no
results.
--
Have a nice day!
http://winmasterplan.blogspot.com
"Jason" wrote:
> I'm trying to list the scheduled tasks on a Win Server 2008 64-bit machine.
> But running the following script produces no results (or errors):
>
> strComputer = "."
>
> set objWMI = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> set colScheduledJobs = objWMI.ExecQuery("Select * from Win32_ScheduledJob")
> for each objJob in colScheduledJobs
> MsgBox objJob.Name
> next