SUPINFO International University

SUPINFO Institute of Information Technology
Laboratoire Microsoft




Lister les tâches planifiées

Accueil > Script > windows_2003 > Lister les tâches planifiées

Lister les tâches planifiées

Par Camille BEFFARA, LABORATOIRE SUPINFO DES TECHNOLOGIES MICROSOFT
Publiée le 23/06/2005 vers 13h.

Description :

Ce script permet de lister toutes les tâches planifiées sur un ordinateur créées avec la classe Win32_ScheduledJob ou l'utilitaire AT.exe, mais en aucun cas les tâches créées avec le planificateur de tâches.

Script :

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colScheduledJobs = objWMIService.ExecQuery _
("Select * from Win32_ScheduledJob")

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colScheduledJobs = objWMIService.ExecQuery _
("Select * from Win32_ScheduledJob")

For Each objJob in colScheduledJobs
Wscript.Echo "Caption: " & objJob.Caption
Wscript.Echo "Command: " & objJob.Command
Wscript.Echo "Days of Month: " & objJob.DaysOfMonth
Wscript.Echo "Days of Week: " & objJob.DaysOfWeek
Wscript.Echo "Description: " & objJob.Description
Wscript.Echo "Elapsed Time: " & objJob.ElapsedTime
Wscript.Echo "Install Date: " & objJob.InstallDate
Wscript.Echo "Interact with Desktop: " & objJob.InteractWithDesktop
Wscript.Echo "Job ID: " & objJob.JobID
Wscript.Echo "Job Status: " & objJob.JobStatus
Wscript.Echo "Name: " & objJob.Name
Wscript.Echo "Notify: " & objJob.Notify
Wscript.Echo "Owner: " & objJob.Owner
Wscript.Echo "Priority: " & objJob.Priority
Wscript.Echo "Run Repeatedly: " & objJob.RunRepeatedly
Wscript.Echo "Start Time: " & objJob.StartTime
Wscript.Echo "Status: " & objJob.Status
Wscript.Echo "Time Submitted: " & objJob.TimeSubmitted
Wscript.Echo "Until Time: " & objJob.UntilTime
Next



Proposer un script

Notre avis :

Votre avis :

Réactions :
0

Votants :
3

Visites :
18852

1
2
3
4
5




Retrouvez ci-dessous les autres sections du Laboratoire Microsoft