TaskService(String, String, String, SecureString, Boolean) Constructor
Namespace: Microsoft.Win32.TaskSchedulerAssembly: Microsoft.Win32.TaskScheduler (in Microsoft.Win32.TaskScheduler.dll) Version: 2.11.1
public TaskService(
string targetServer,
string userName,
string accountDomain,
SecureString userSecurePassword,
bool forceV1 = false
)
Parameters
- targetServer String
-
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 String
-
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 String
- The domain of the user specified in the userName parameter.
- userSecurePassword SecureString
-
The password that is used to connect to the computer as a SecureString. If the user name and securePassword are not specified, then the current token is used.
- forceV1 Boolean (Optional)
- If set to true force Task Scheduler 1.0 compatibility.