删除报告服务器(2014本机模式)encryption密钥和数据

删除报告服务器(2014本机模式)encryption密钥和数据,第1张

概述删除报告服务器(2014本机模式)encryption密钥和数据

从图像中克隆实例后,需要执行几个手动步骤才能使报表服务器正常工作。 其中包括删除所有encryption数据,包括报表服务器数据库上的对称密钥实例。

这一步需要我到RDP到有问题的服务器,打开Reporting Servicesconfigurationpipe理器并手动删除encryption的数据。

不执行这一步,当我尝试加载新服务器的报表服务器接口时,出现以下错误:

报表服务器无法打开到报表服务器数据库的连接。 所有请求和处理都需要到数据库的连接。 (rsreportserverDatabaseUnavailable)

有什么报告解决scheme在linux上工作吗?

导出到pdf到本地文件夹

禁用报告服务的windows身份valIDation

我试图自动化这一步,以便它作为PowerShell脚本的一部分运行,以远程删除encryption的数据。

我知道'rskeymgmt -d',但是这会在运行时提示用户input,并且没有强制标志可以绕过这个额外的input,使得它不能用于远程运行,我可以看到:

C:>rskeymgmt -d All data will be lost. Are you sure you want to delete all encrypted data from the report server database (Y/N)?

我找到了解决这个问题的解决方案。 通过远程PowerShell会话调用RSKeyMgmt -d并将Y字符串传送给该调用传递RSKeyMgmt提示用户的参数。 此方法基于Som DT的备份报告服务器加密密钥的文章

我附上了我正在使用的完整脚本,作为我的环境克隆过程的一部分。

<# .SYnopSIS Deletes encrypted content from a report server .ParaMETER Machinename The name of the machine that the report server resIDes on .EXAMPLE ./Delete-EncryptedSsrsContent.ps1 -Machinename 'dev41pc123' Deletes encrypted content from the 'dev41pc123' report server #> param([string]$Machinename = $(throw "Machinename parameter required,for command line usage of this script,type: 'get-help ./Delete-EncryptedSSRS.ps1 -examples'")) trap [SystemException]{Write-Output "`n`nERROR: $_";exit 1} Set-StrictMode -Version Latest try { Write-Output "`nCreating remote session to the '$machinename' machine Now..." $session = New-PSsession -Computername $machinename Invoke-Command -Session $Session -ScriptBlock {"Y" | RSKeyMgmt -d} } catch { Write-Output "`n`nERROR: $_" } finally { if ($Session) { Remove-PSSession $Session } }

这是ShaneC的解决方案的一般化,以支持在非默认实例上删除加密内容:

<# .SYnopSIS Deletes encrypted content from a report server .ParaMETER Machinename The name of the machine that the report server resIDes on .EXAMPLE ./Delete-EncryptedSsrsContent.ps1 -Machinename 'dev41pc123' Deletes encrypted content from the default instance (MSsqlSERVER) of the 'dev41pc123' report server .EXAMPLE ./Delete-EncryptedSsrsContent.ps1 -Machinename 'dev41pc123' -Instancename 'NonDefault' Deletes encrypted content from the specifIEd non-default instance (eg NonDefault) of the 'dev41pc123' report server #> param( [Parameter(Mandatory=$true)] [string]$Machinename = $(throw "Machinename parameter required,type: 'get-help ./Delete-EncryptedSSRS.ps1 -examples'"),[Parameter(Mandatory=$false)] [string]$Instancename) trap [SystemException]{Write-Output "`n`nERROR: $_";exit 1} Set-StrictMode -Version Latest try { Write-Output "`nCreating remote session to the '$Machinename' machine Now..." $session = New-PSsession -Computername $Machinename if ([string]::IsNullOrEmpty($instancename)) { Invoke-Command -Session $Session -ScriptBlock {"Y" | RSKeyMgmt.exe -d} } else { Write-Output "`nDeleting all encrypted content from the $Instancename instance on the $Machinename machine Now...`n" $command = """Y""| RSKeyMgmt.exe -d -i""" + $Instancename + """" Invoke-Command -Session $Session -ScriptBlock { Invoke-Expression $args[0] } -ArgumentList $command Write-Output "`n" } } catch { Write-Output "`n`nERROR: $_" } finally { if ($Session) { Remove-PSSession $Session } }

总结

以上是内存溢出为你收集整理的删除报告服务器(2014本机模式)encryption密钥和数据全部内容,希望文章能够帮你解决删除报告服务器(2014本机模式)encryption密钥和数据所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/langs/1278996.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-06-09
下一篇2022-06-09

发表评论

登录后才能评论

评论列表(0条)

    保存