Skip to content

Latest commit

 

History

History
94 lines (55 loc) · 2.21 KB

registeredtask-getinstances.md

File metadata and controls

94 lines (55 loc) · 2.21 KB
title description ms.assetid keywords topic_type api_name api_location api_type ms.topic ms.date
RegisteredTask.GetInstances method
For scripting, returns all currently running instances of the registered task.
01fea94e-fdec-4edf-886a-f6d9b566f201
GetInstances method Task Scheduler
GetInstances method Task Scheduler , RegisteredTask object
RegisteredTask object Task Scheduler , GetInstances method
apiref
RegisteredTask.GetInstances
taskschd.dll
COM
reference
05/31/2018

RegisteredTask.GetInstances method

For scripting, returns all currently running instances of the registered task.

Note

RegisteredTask.GetInstances will only return instances of the currently running registered task that are running at or below a user's security context. For example, for members of the Administrators group, GetInstances will return all instances of the currently running registered task, but for members of the Users group, GetInstances will only return instances of the currently running registered task that are running under the Users group security context.

Syntax

RegisteredTask.GetInstances( _
  ByVal flags, _
  ByRef runningTasks _
)

Parameters

flags

This parameter is reserved for future use and must be set to 0.

runningTasks [out]

A RunningTaskCollection object that contains all currently running instances of the task.

Return value

This method does not return a value.

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Type library
Taskschd.tlb
DLL
Taskschd.dll

See also

Task Scheduler

RegisteredTask