2
如何使用PowerShell更新或更改RSReportServer.config文件?使用PowerShell修改RSReportServer.config
我想要将Service标记内的IsReportManagerEnabled标记中的值从True更改为False。
非常感谢。
如何使用PowerShell更新或更改RSReportServer.config文件?使用PowerShell修改RSReportServer.config
我想要将Service标记内的IsReportManagerEnabled标记中的值从True更改为False。
非常感谢。
每http://msdn.microsoft.com/en-us/library/bb630448.aspx,您的配置文件很可能在c:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\
但更新下面是为您的系统是正确的。在做其他事情之前先备份文件。
[xml]$config = gc "c:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\RSReportServer.config"
$config.SelectSingleNode("//IsReportManagerEnabled").InnerText = "False";
$config.save("c:\Program Files\Microsoft SQL Server\MSSQL.n\Reporting Services\ReportServer\RSReportServer.config")
您可能需要重新启动ReportServer服务才能使其生效。
非常感谢上百万的人。我相信它会起作用,但我会在明天测试并标记答案。 – Yster
将路径更改为:C:\ Program Files \ Microsoft SQL Server \ MSRS10_50.MSSQLSERVER \ Reporting Services \ ReportServer \ RSReportServer.config后,它的运行没有错误,但在检查文件时,该值仍然为true。 – Yster
以管理员身份运行Powershell。您的常规用户帐户(即使它可能位于管理员组中)可能没有编辑该文件的权限。 – alroc