|
| |||||||||
| Tags: listing, scheduled, vbscript |
![]() |
| | Thread Tools | Search this Thread |
|
#1
| |||
| |||
| VBScript for WMI listing of scheduled tasks?
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 |
|
#2
| |||
| |||
| RE: VBScript for WMI listing of scheduled tasks?
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 |
|
#3
| |||
| |||
| RE: VBScript for WMI listing of scheduled tasks?
Thank you. And is there a WMI class (or other script-accessible class) with which I can list the jobs created via the Scheduled Task interface? "Masterplan" wrote: > 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 |
|
#4
| |||
| |||
| RE: VBScript for WMI listing of scheduled tasks?
Hi again, I didn't find such a specific class. I used a time ago schtasks /query to do this. -- Have a nice day! http://winmasterplan.blogspot.com "Jason" wrote: > Thank you. > > And is there a WMI class (or other script-accessible class) with which I can > list the jobs created via the Scheduled Task interface? > > "Masterplan" wrote: > > > 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 |
![]() |
|
| Thread Tools | Search this Thread |
| |
Similar Threads for: "VBScript for WMI listing of scheduled tasks?" | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Windows Scheduled Tasks don't luanch if tasks not finished | Andy Candy | Windows Software | 3 | 21-08-2009 12:47 PM |
| Scheduled Tasks: Notify me of missed tasks | Swifty | Windows XP Support | 2 | 02-01-2009 02:45 PM |
| Scheduled Tasks | Starfish | Small Business Server | 2 | 07-10-2008 04:50 PM |
| Scheduled Tasks | requeth@gmail.com | Windows Server Help | 2 | 22-01-2008 11:38 PM |
| Where are kept Scheduled tasks? | Jack | Vista Help | 8 | 18-01-2008 01:28 AM |