IRemoteCommand.StartWithCredentials(String, String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for