Service.SetServiceAccount(String, String) Method

Definition

Sets the account under which the SQL Server service runs.

public:
 void SetServiceAccount(System::String ^ userName, System::String ^ password);
public void SetServiceAccount (string userName, string password);
member this.SetServiceAccount : string * string -> unit
Public Sub SetServiceAccount (userName As String, password As String)

Parameters

userName
String

A String value that specifies the system account under which the SQL Server service runs.

password
String

A String value that specifies the password for the system account.

Examples

Managing Services and Network Settings by Using WMI Provider

Applies to

See also