ConfigurationSetting method - SetUnattendedExecutionAccount

Specifies the account used to execute reports unattended.

Syntax

Public Sub SetUnattendedExecutionAccount(UserName as String, _  
    Password as String, ByRef HRESULT as Int32)  
public void SetUnattendedExecutionAccount (string UserName,   
    string Password, out Int32 HRESULT);  

Parameters

UserName
A Windows account to be used for unattended executions.

Password
The password for the specified account.

HRESULT
[out] Value indicating whether the call succeeded or failed.

Return value

Returns an HRESULT indicating success or failure of the method call. A value of 0 indicates that the method call was successful. A nonzero value indicates that an error occurred.

Remarks

The SetUnattendedExecutionAccount method doesn't verify whether the report server can sign in as the specified user.

It isn't possible to use the SetUnattendedExecutionAccount method to run unattended executions in the context of the report server Windows service.

Requirements

Namespace: root\Microsoft\SqlServer\ReportServer\<InstanceName>\v13\Admin