Skip to content

Request‑SqlDscRSDatabaseUpgradeScript

dscbot edited this page Jan 6, 2026 · 1 revision

SYNOPSIS

Gets the database upgrade script for SQL Server Reporting Services.

SYNTAX

Request-SqlDscRSDatabaseUpgradeScript [-Configuration] <Object> 
 [<CommonParameters>]

DESCRIPTION

Gets the database upgrade script for SQL Server Reporting Services or Power BI Report Server by calling the GenerateDatabaseUpgradeScript method on the MSReportServer_ConfigurationSetting CIM instance.

This command generates a Transact-SQL script that can be used to upgrade the report server database schema to match the current Reporting Services version. This is useful during upgrade scenarios.

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

EXAMPLES

EXAMPLE 1

Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Request-SqlDscRSDatabaseUpgradeScript

Gets the database upgrade script for the Reporting Services instance.

EXAMPLE 2

$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
$script = Request-SqlDscRSDatabaseUpgradeScript -Configuration $config
Invoke-Sqlcmd -ServerInstance 'localhost' -Database 'ReportServer' -Query $script

Gets the upgrade script and executes it against the database.

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

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

System.String

Returns the Transact-SQL script for upgrading the database.

NOTES

Review the generated script before executing it against a production database. Always back up the database before performing upgrades.

RELATED LINKS

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

Home

Commands

How-to

Resources

Usage

Clone this wiki locally