My new tip has been posted on PowerShell Magazine is on how to retrieve scheduled tasks using Schedule.Service Com Object using PowerShell. Using this object it is possible to retrieve information about scheduled tasks either on the local or remote system. The full article containing tips on how to use this com object and what the considerations are when using this object is available on PowerShell Magazine : Retrieve scheduled tasks using Schedule.Service COMObject
The following code will connect to the local system using the Schedule.Service Com Object, administrative permissions are required to run this code:
$Schedule = New-Object -ComObject "Schedule.Service" $Schedule.Connect('localhost') $Folder = $Schedule.GetFolder('\') $Folder.GetTasks(1) | Select Name,Path,State
For more articles like this, have a look at the External Articles section of my blog, it contains all the articles I have posted on external sources such as PowerShell Magazine. The article posted on PowerShell magazine contains a link to my Get-ScheduledTask script in the TechNet Script Gallery.
|Links in this Article|
|PSTip: Retrieve scheduled tasks using Schedule.Service COMObject|
|My entries in TechNet Script Gallery|