Web Services 运行SSRS powershell命令时出错

jhkqcmku  于 2022-11-15  发布在  Shell
关注(0)|答案(1)|浏览(161)

我正在从桌面运行下面的Powershell命令,以将SSRS报告部署到开发报告服务器上。我收到下面的错误:
指令:

Write-RsFolderContent -ReportServerUri http://serverName/ReportServer -Path "C:\temp\sql\RDL\ProjectName\bin\Debug\” -Destination /ReportTest -Verbose"

New-Rsfolder -ReportServerUri http://serverName/ReportServer -Path "C:\temp\sql\RDL\ProjectName\bin\Debug\” -Name /ReportTest -Verbose

错误:

PS C:\WINDOWS\system32> New-Rsfolder -ReportServerUri http://serverName/ReportServer -Path "C:\temp\sql\RDL\ProjectName\bin\Debug\” -Name /ReportTest -Verbose
VERBOSE: Establishing proxy connection to http://serverName/ReportServer/ReportService2010.asmx...
Failed to establish proxy connection to http://serverName/ReportServer/ReportService2010.asmx : There was an error downloading 'http://serverName/ReportServer/ReportService2010.asmx'.
At C:\ProgramFiles\WindowsPowerShell\Modules\ReportingServicesTools\0.0.4.7\Functions\Utilities\New-RsWebServiceProxy.ps1:114 char:9
+         throw (New-Object System.Exception("Failed to establish proxy ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : OperationStopped: (:) [], Exception
+ FullyQualifiedErrorId : Failed to establish proxy connection to http://serverName/ReportServer/ReportService2010.asmx : There was an error downloading 'http://serverName/ReportServer/ReportService2010.asmx'.

但是,在IE/Chrome中导航到Web服务(http://serverName/ReportServer/ReportService2010.asmx.)没有问题。
是否必须指定凭据(用户名和密码)才能连接到Web服务?
谢谢你的帮助!

ha5z0ras

ha5z0ras1#

我知道这是一个迟来的答案,但我希望它能帮助其他人。当连接到远程服务器时,您需要指定凭据以进行身份验证,如下所示:

注意:此示例说明如何添加文件夹,但-Credential参数可以添加到其他命令中

New-RsFolder -ReportServerUri [Your Web Service URL] -Path / -Name TestFolder -Verbose -Credential 'remoteUserName'
当您执行命令时,应该会出现要求输入密码的快显视窗。假设您的认证是正确的,命令应该会顺利执行。
如果没有指定-Credential,它将使用当前用户的凭据(我猜它只适用于Windows身份验证),因此无法建立远程服务器代理连接。

相关问题