-
Notifications
You must be signed in to change notification settings - Fork 226
Backup‑SqlDscRSEncryptionKey
Backs up the encryption key for SQL Server Reporting Services.
Backup-SqlDscRSEncryptionKey -Configuration <Object> -Path <String> -Password <SecureString>
[-Credential <PSCredential>] [-DriveName <String>] [-PassThru] [-Force]
[-WhatIf] [-Confirm] [<CommonParameters>]
Backs up the encryption key for SQL Server Reporting Services or
Power BI Report Server by calling the BackupEncryptionKey method
on the MSReportServer_ConfigurationSetting CIM instance.
The encryption key is essential for decrypting stored credentials and connection strings in the report server database. This backup should be stored securely and is required for disaster recovery or migration scenarios.
The configuration CIM instance can be obtained using the
Get-SqlDscRSConfiguration command and passed via the pipeline.
$password = Read-Host -AsSecureString -Prompt 'Enter backup password'
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Backup-SqlDscRSEncryptionKey -Path 'C:\Backup\RSKey.snk' -Password $password
Backs up the encryption key to a local file.
$password = ConvertTo-SecureString -String 'MyP@ssw0rd' -AsPlainText -Force
$config = Get-SqlDscRSConfiguration -InstanceName 'SSRS'
Backup-SqlDscRSEncryptionKey -Configuration $config -Path '\Server\Share\RSKey.snk' -Password $password -Credential (Get-Credential) -Force
Backs up the encryption key to a UNC path with credentials and without confirmation.
$password = Read-Host -AsSecureString -Prompt 'Enter backup password'
Get-SqlDscRSConfiguration -InstanceName 'SSRS' | Backup-SqlDscRSEncryptionKey -Path 'C:\Backup\RSKey.snk' -Password $password -PassThru
Backs up the encryption key and returns the configuration CIM instance.
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: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: FalseSpecifies the credentials to use when accessing a UNC path. Use this parameter when the Path is a network share that requires authentication.
Type: PSCredential
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the name of the temporary PSDrive to create when accessing a UNC path with credentials. Defaults to 'RSKeyBackup'. This parameter can only be used together with the Credential parameter.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: RSKeyBackup
Accept pipeline input: False
Accept wildcard characters: FalseIf 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: FalseIf specified, returns the configuration CIM instance after backing up the encryption key.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the password to protect the encryption key backup file. This password will be required when restoring the encryption key.
Type: SecureString
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseSpecifies the full path where the encryption key backup file will be saved. The file extension should be .snk (Strong Name Key).
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalsePrompts 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: FalseShows 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: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Store the backup file and password securely. They are required to restore the encryption key in disaster recovery scenarios or when migrating to a new server.
- Add-SqlDscFileGroup
- Add-SqlDscNode
- Add-SqlDscRSSslCertificateBinding
- Add-SqlDscRSUrlReservation
- Add-SqlDscTraceFlag
- Assert-SqlDscAgentOperator
- Assert-SqlDscLogin
- Backup-SqlDscDatabase
- Backup-SqlDscRSEncryptionKey
- Complete-SqlDscFailoverCluster
- Complete-SqlDscImage
- Connect-SqlDscDatabaseEngine
- ConvertFrom-SqlDscDatabasePermission
- ConvertFrom-SqlDscServerPermission
- ConvertTo-SqlDscDatabasePermission
- ConvertTo-SqlDscDataFile
- ConvertTo-SqlDscEditionName
- ConvertTo-SqlDscFileGroup
- ConvertTo-SqlDscServerPermission
- Deny-SqlDscServerPermission
- Disable-SqlDscAgentOperator
- Disable-SqlDscAudit
- Disable-SqlDscDatabaseSnapshotIsolation
- Disable-SqlDscLogin
- Disable-SqlDscRsSecureConnection
- Disconnect-SqlDscDatabaseEngine
- Enable-SqlDscAgentOperator
- Enable-SqlDscAudit
- Enable-SqlDscDatabaseSnapshotIsolation
- Enable-SqlDscLogin
- Enable-SqlDscRsSecureConnection
- Get-SqlDscAgentAlert
- Get-SqlDscAgentOperator
- Get-SqlDscAudit
- Get-SqlDscBackupFileList
- Get-SqlDscCompatibilityLevel
- Get-SqlDscConfigurationOption
- Get-SqlDscDatabase
- Get-SqlDscDatabasePermission
- Get-SqlDscDateTime
- Get-SqlDscInstalledInstance
- Get-SqlDscLogin
- Get-SqlDscManagedComputer
- Get-SqlDscManagedComputerInstance
- Get-SqlDscManagedComputerService
- Get-SqlDscPreferredModule
- Get-SqlDscRole
- Get-SqlDscRSConfigFile
- Get-SqlDscRSConfiguration
- Get-SqlDscRSDatabaseInstallation
- Get-SqlDscRSExecutionLog
- Get-SqlDscRSIPAddress
- Get-SqlDscRSLogPath
- Get-SqlDscRSPackage
- Get-SqlDscRSServiceAccount
- Get-SqlDscRSSetupConfiguration
- Get-SqlDscRSSslCertificate
- Get-SqlDscRSSslCertificateBinding
- Get-SqlDscRSUrl
- Get-SqlDscRSUrlReservation
- Get-SqlDscRSVersion
- Get-SqlDscRSWebPortalApplicationName
- Get-SqlDscServerPermission
- Get-SqlDscServerProtocol
- Get-SqlDscServerProtocolName
- Get-SqlDscServerProtocolTcpIp
- Get-SqlDscSetupLog
- Get-SqlDscStartupParameter
- Get-SqlDscTraceFlag
- Grant-SqlDscServerPermission
- Import-SqlDscPreferredModule
- Initialize-SqlDscFailoverCluster
- Initialize-SqlDscImage
- Initialize-SqlDscRebuildDatabase
- Initialize-SqlDscRS
- Install-SqlDscFailoverCluster
- Install-SqlDscPowerBIReportServer
- Install-SqlDscReportingService
- Install-SqlDscServer
- Invoke-SqlDscQuery
- Invoke-SqlDscScalarQuery
- New-SqlDscAgentAlert
- New-SqlDscAgentOperator
- New-SqlDscAudit
- New-SqlDscDatabase
- New-SqlDscDatabaseSnapshot
- New-SqlDscDataFile
- New-SqlDscFileGroup
- New-SqlDscLogin
- New-SqlDscRole
- New-SqlDscRSEncryptionKey
- Remove-SqlDscAgentAlert
- Remove-SqlDscAgentOperator
- Remove-SqlDscAudit
- Remove-SqlDscDatabase
- Remove-SqlDscLogin
- Remove-SqlDscNode
- Remove-SqlDscRole
- Remove-SqlDscRSEncryptedInformation
- Remove-SqlDscRSEncryptionKey
- Remove-SqlDscRSSslCertificateBinding
- Remove-SqlDscRSUnattendedExecutionAccount
- Remove-SqlDscRSUrlReservation
- Remove-SqlDscTraceFlag
- Repair-SqlDscPowerBIReportServer
- Repair-SqlDscReportingService
- Repair-SqlDscServer
- Request-SqlDscRSDatabaseRightsScript
- Request-SqlDscRSDatabaseScript
- Request-SqlDscRSDatabaseUpgradeScript
- Restart-SqlDscRSService
- Restore-SqlDscDatabase
- Restore-SqlDscRSEncryptionKey
- Resume-SqlDscDatabase
- Revoke-SqlDscServerPermission
- Save-SqlDscSqlServerMediaFile
- Set-SqlDscAgentAlert
- Set-SqlDscAgentOperator
- Set-SqlDscAudit
- Set-SqlDscConfigurationOption
- Set-SqlDscDatabaseDefault
- Set-SqlDscDatabaseOwner
- Set-SqlDscDatabasePermission
- Set-SqlDscDatabaseProperty
- Set-SqlDscRSDatabaseConnection
- Set-SqlDscRSDatabaseTimeout
- Set-SqlDscRSServiceAccount
- Set-SqlDscRSSmtpConfiguration
- Set-SqlDscRSSslCertificateBinding
- Set-SqlDscRSUnattendedExecutionAccount
- Set-SqlDscRSUrlReservation
- Set-SqlDscRSVirtualDirectory
- Set-SqlDscServerPermission
- Set-SqlDscStartupParameter
- Set-SqlDscTraceFlag
- Start-SqlDscRSWebService
- Start-SqlDscRSWindowsService
- Stop-SqlDscRSWebService
- Stop-SqlDscRSWindowsService
- Suspend-SqlDscDatabase
- Test-SqlDscAgentAlertProperty
- Test-SqlDscBackupFile
- Test-SqlDscConfigurationOption
- Test-SqlDscDatabaseProperty
- Test-SqlDscIsAgentAlert
- Test-SqlDscIsAgentOperator
- Test-SqlDscIsDatabase
- Test-SqlDscIsDatabasePrincipal
- Test-SqlDscIsLogin
- Test-SqlDscIsLoginEnabled
- Test-SqlDscIsRole
- Test-SqlDscIsSupportedFeature
- Test-SqlDscRSAccessible
- Test-SqlDscRSInitialized
- Test-SqlDscRSInstalled
- Test-SqlDscServerPermission
- Uninstall-SqlDscPowerBIReportServer
- Uninstall-SqlDscReportingService
- Uninstall-SqlDscServer
- Update-SqlDscServer
- Update-SqlDscServerEdition
- Change Report Server Service Account
- Deploy Power BI Report Server
- Setting up a SQL Server AlwaysOn Availability Groups
- Setting up a SQL Server Failover Cluster
- Troubleshooting Report Server
- SqlAG
- SqlAGDatabase
- SqlAgentAlert
- SqlAgentFailsafe
- SqlAgentOperator
- SqlAGListener
- SqlAGReplica
- SqlAlias
- SqlAlwaysOnService
- SqlAudit
- SqlConfiguration
- SqlDatabase
- SqlDatabaseDefaultLocation
- SqlDatabaseMail
- SqlDatabaseObjectPermission
- SqlDatabasePermission
- SqlDatabaseRole
- SqlDatabaseUser
- SqlEndpoint
- SqlEndpointPermission
- SqlLogin
- SqlMaxDop
- SqlMemory
- SqlPermission
- SqlProtocol
- SqlProtocolTcpIp
- SqlReplication
- SqlRole
- SqlRS
- SqlRSSetup
- SqlScript
- SqlScriptQuery
- SqlSecureConnection
- SqlServiceAccount
- SqlSetup
- SqlTraceFlag
- SqlWaitForAG
- SqlWindowsFirewall