【发布时间】:2012-09-12 13:48:55
【问题描述】:
如何使用 PowerShell 更新或更改 RSReportServer.config 文件?
我想将服务标记内 IsReportManagerEnabled 标记中的值从 True 更改为 False。
非常感谢。
【问题讨论】:
标签: powershell config reportserver
如何使用 PowerShell 更新或更改 RSReportServer.config 文件?
我想将服务标记内 IsReportManagerEnabled 标记中的值从 True 更改为 False。
非常感谢。
【问题讨论】:
标签: powershell config reportserver
根据 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 服务才能使其生效。
【讨论】: