 | TaskService Constructor (String, String, String, String, Boolean) |
Namespace:
Microsoft.Win32.TaskScheduler
Assembly:
Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.10.1
Syntaxpublic TaskService(
string targetServer,
string userName = null,
string accountDomain = null,
string password = null,
bool forceV1 = false
)
Public Sub New (
targetServer As String,
Optional userName As String = Nothing,
Optional accountDomain As String = Nothing,
Optional password As String = Nothing,
Optional forceV1 As Boolean = false
)
public:
TaskService(
String^ targetServer,
String^ userName = nullptr,
String^ accountDomain = nullptr,
String^ password = nullptr,
bool forceV1 = false
)
Request Example
View SourceParameters
- 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