My script below yields this error "Method invocation failed because [SSRS.ReportService2010.ReportingService2010] doesn't contain a method named 'CreateReport'.
At C:\Users\mike.davis\Desktop\BI\REPORTS\TPFReport\TPFReport\bin\Debug\Bulk SSRS Report Deployment with PowerShell.ps1:28 char:40
+ $Warnings = $SSRSProxy.CreateReport <<<< ($_.ReportName, $_.TargetReportFolder, $True, $Bytes, $Null)
+ CategoryInfo : InvalidOperation: (CreateReport:String) [], RuntimeException
+ FullyQualifiedErrorId : MethodNotFound"
$SourceDirectory = "C:\Users\mike.davis\Desktop\BI\REPORTS\TPFReport\TPFReport\bin\Debug" $DeploymentFileName = "AutoDeploymentDEV.csv" $DeploymentFileName = $SourceDirectory + "\" + $DeploymentFileName Import-Csv $DeploymentFileName | foreach { $ReportServiceURI = "http://" + $_.ReportServerName + "/_vti_bin/ReportServer/ReportService2010.asmx" $RDLFileName = $SourceDirectory + "\" + $_.RDLFileName write-host "----------------------------------------------------------------------------------------------------------------------------------------" write-host "Deploying" $RDLFileName write-host " to" $_.TargetReportFolder "as" $_.ReportName $SSRSProxy = new-webserviceproxy -Uri $ReportServiceURI -Namespace SSRS.ReportService2010 -UseDefaultCredential $Bytes = [System.IO.File]::ReadAllBytes($RDLFileName) $Warnings = $SSRSProxy.CreateReport($_.ReportName, $_.TargetReportFolder, $True, $Bytes, $Null) if ($Warnings) { foreach ($Warning in $Warnings) { write-warning $Warning.Message } } }
What Method should I use or what am I doing wrong? Reportservices2005 has a CreateReport Method. What happened to that in ReportService2010?