Service.SetServiceAccount(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.
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.
Examples
Managing Services and Network Settings by Using WMI Provider