Click or drag to resize
Task Scheduler Managed Class Library

TaskService Constructor (String, String, String, String, Boolean)

Initializes a new instance of the TaskService class.

Namespace:  Microsoft.Win32.TaskScheduler
Assembly:  Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntax
public TaskService(
	string targetServer,
	string userName = null,
	string accountDomain = null,
	string password = null,
	bool forceV1 = false
)
Request Example View Source

Parameters

targetServer
Type: SystemString
The name of the computer that you want to connect to. If the this parameter is empty, then this will connect to the local computer.
userName (Optional)
Type: SystemString
The user name that is used during the connection to the computer. If the user is not specified, then the current token is used.
accountDomain (Optional)
Type: SystemString
The domain of the user specified in the userName parameter.
password (Optional)
Type: SystemString
The password that is used to connect to the computer. If the user name and password are not specified, then the current token is used.
forceV1 (Optional)
Type: SystemBoolean
If set to true force Task Scheduler 1.0 compatibility.
See Also