IRemoteCommand.StartWithCredentials(String, String) Method

Definition

Runs the command using the specified credentials.

public void StartWithCredentials (string userName, string password);
abstract member StartWithCredentials : string * string -> unit
Public Sub StartWithCredentials (userName As String, password As String)

Parameters

userName
String

The name of the RunAs user, in the form domain\username. The user name is limited to 80 characters. If this parameter is NULL, the method uses the owner of the job. If this parameter is an empty string, the service searches the credentials cache for the credentials to use. If the cache contains the credentials for a single user, those credentials are used. However, if multiple credentials exist in the cache, the user is prompted for the credentials.

password
String

The password for the RunAs user. The password is limited to 127 characters.If this parameter is null or empty, the method uses the cached password if cached; otherwise, the user is prompted for the password.

Applies to