Skip to content

Set‑SqlDscRSUnattendedExecutionAccount

dscbot edited this page Jan 16, 2026 · 1 revision

SYNOPSIS

Sets the unattended execution account for SQL Server Reporting Services.

SYNTAX

Set-SqlDscRSUnattendedExecutionAccount [-Configuration] <Object> [-Credential] <PSCredential> [-PassThru]
 [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

Sets the unattended execution account for SQL Server Reporting Services or Power BI Report Server by calling the SetUnattendedExecutionAccount method on the MSReportServer_ConfigurationSetting CIM instance.

The unattended execution account is used when running reports that require credentials for data sources but no user credentials are available, such as scheduled subscriptions.

The configuration CIM instance can be obtained using the Get-SqlDscRSConfiguration command and passed via the pipeline.

EXAMPLES

EXAMPLE 1

$credential = Get-Credential
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Set-SqlDscRSUnattendedExecutionAccount -Credential $credential

Sets the unattended execution account for the Reporting Services instance.

EXAMPLE 2

$credential = Get-Credential
$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
Set-SqlDscRSUnattendedExecutionAccount -Configuration $config -Credential $credential -Force

Sets the unattended execution account without confirmation.

EXAMPLE 3

$credential = Get-Credential
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Set-SqlDscRSUnattendedExecutionAccount -Credential $credential -PassThru

Sets the unattended execution account and returns the configuration CIM instance.

PARAMETERS

-Configuration

Specifies the MSReportServer_ConfigurationSetting CIM instance for the Reporting Services instance. This can be obtained using the Get-SqlDscRSConfiguration command. This parameter accepts pipeline input.

Type: Object
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Credential

Specifies the credentials for the unattended execution account. This account should have minimal permissions, only what is required to access data sources.

Type: PSCredential
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Force

If specified, suppresses the confirmation prompt.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PassThru

If specified, returns the configuration CIM instance after setting the unattended execution account.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.Management.Infrastructure.CimInstance

Accepts MSReportServer_ConfigurationSetting CIM instance via pipeline.

OUTPUTS

None. By default, this command does not generate any output.

Microsoft.Management.Infrastructure.CimInstance

When PassThru is specified, returns the MSReportServer_ConfigurationSetting

CIM instance.

NOTES

The Reporting Services service may need to be restarted for the changes to take effect.

The unattended execution account credentials are stored encrypted in the report server database.

RELATED LINKS

https://docs.microsoft.com/en-us/sql/reporting-services/wmi-provider-library-reference/configurationsetting-method-setunattendedexecutionaccount

Home

Commands

How-to

Resources

Usage

Clone this wiki locally