'Error running SSRS powershell cmd

I'm running the Powershell commands below from my desktop to deploy the SSRS reports to the on a dev report server. I get the error below:

Commands:

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

Error:

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'.

However, there is no issue navigating to the web service (http://serverName/ReportServer/ReportService2010.asmx.) in IE/Chrome.

Do I have to specify the credentials (username and password) to connect to the web service?

Thanks for the help!



Solution 1:[1]

I know this is a late answer but I hope it helps someone else. When connecting to a remote server you need to specify the Credentials for authentication purposes like so:

Note: This example shows how to add a folder but the -Credential param can be added to other commands

New-RsFolder -ReportServerUri [Your Web Service URL] -Path / -Name TestFolder -Verbose -Credential 'remoteUserName'

When you run the command a popup should appear asking for the password. Assuming your credentials are correct, the command should execute successfully.

If -Credential is not specified it will use current user's credentials (Which I am guessing would only work for windows authentication) and consequently fail to establish the remote server proxy connection.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Ricardo Smith