Edit

Share via


RemoteCommand.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
override this.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, empty, or not valid, the service searches the credential 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.

Implements

Applies to