Commands / Set-sqmSsrsConfiguration
Configuration

Set-sqmSsrsConfiguration

Fully configures SQL Server Reporting Services (SSRS) or Power BI Report Server — service account, ReportServer database, URLs, and encryption key backup — via WMI. Supports Native Mode, AlwaysOn listeners, and individual step skipping.

Module: sqmSQLTool
Requires: dbatools + WMI (ReportingService)
ShouldProcess: Yes (Medium)
Output: PSCustomObject

Execution Flow

START Connect to WMI ReportingService on ComputerName -PbmPolicyName given? Disable PBM policy before DB create -SkipServiceAccount? Yes (skip) No SetWindowsServiceIdentity (service account) -SkipDatabase? Yes (skip) Create ReportServer DB + grant permissions + set connection -SkipUrls? Yes (skip) ReserveUrl ReportServer + Reports (Web Service + Portal) -SkipEncryptionKeyBackup? Yes (skip) BackupEncryptionKey → EncryptionKeyFile (.snk) Re-enable PBM policy (if disabled) → Return PSCustomObject DONE
Each configuration area (service account, database, URLs, encryption key) can be skipped independently with the matching -Skip* switch. For AlwaysOn, set -DatabaseServer to the AG listener — the DB is created on the primary and SSRS connects via the listener. SQL auth is supported via -DatabaseAuthType SQL + -DatabaseCredential.

Parameters

ParameterTypeRequiredDescription
-ComputerNameStringOptionalSSRS server (local or remote). Default: $env:COMPUTERNAME.
-InstanceNameStringOptionalSSRS instance name. Default: MSSQLSERVER.
-DatabaseServerStringOptionalSQL Server instance or AG listener for the ReportServer database. Default: ComputerName.
-DatabaseNameStringOptionalReportServer database name. Default: ReportServer.
-ReportServerUrlStringOptionalWeb Service URL. Default: http://+:80/ReportServer.
-ReportsUrlStringOptionalWeb Portal URL. Default: http://+:80/Reports.
-ServiceAccountStringOptionalWindows service account for SSRS (e.g. DOMAIN\user).
-ServiceAccountPasswordSecureStringOptionalPassword for -ServiceAccount. Not needed for managed service accounts.
-DatabaseAuthTypeStringOptionalWindows (default) or SQL.
-DatabaseCredentialPSCredentialOptionalSQL credential for -DatabaseAuthType SQL.
-EncryptionKeyFileStringOptionalPath for the encryption key backup (.snk). Default: OutputPath\SsrsEncryptionKey_*.snk.
-EncryptionKeyPasswordSecureStringOptionalPassword for the encryption key backup.
-PbmPolicyNameStringOptionalPBM policy to disable before DB creation and re-enable after.
-SkipDatabaseSwitchOptionalSkip database creation/configuration step.
-SkipUrlsSwitchOptionalSkip URL reservation step.
-SkipServiceAccountSwitchOptionalSkip service account configuration step.
-SkipEncryptionKeyBackupSwitchOptionalSkip encryption key backup step.
-OutputPathStringOptionalDirectory for the encryption key backup file.
-CredentialPSCredentialOptionalCredential for remote WMI connection to ComputerName.
-EnableExceptionSwitchOptionalThrow terminating errors instead of logging warnings.

Return Value

Returns a PSCustomObject with: ComputerName, InstanceName, DatabaseServer, DatabaseName, ReportServerUrl, ReportsUrl, EncryptionKeyFile, Status, Message.

Examples

Example 1 — Full auto-configuration on local server

Set-sqmSsrsConfiguration -ServiceAccount "DOMAIN\svc-ssrs" -ServiceAccountPassword $pw

Example 2 — Remote server with AG listener as DB backend

Set-sqmSsrsConfiguration -ComputerName "SSRS01" -DatabaseServer "AG-Listener" -Credential $cred

Example 3 — Only reconfigure URLs (skip all other steps)

Set-sqmSsrsConfiguration -SkipServiceAccount -SkipDatabase -SkipEncryptionKeyBackup `
    -ReportServerUrl "http://+:8080/ReportServer" -ReportsUrl "http://+:8080/Reports"