0
votes

We are migrating MOSS to SP2010 and have a library with hundreds of SSRS reports that use a Shared DataSource (in SharePoint Integrated mode.) Since the ReportServer database location has also changed, we lose all of the connection data between the reports and their Shared DataSource. Rather than going through each report in the UI to "Manage Data Sources," I would like to update all of the reports via Powershell.

I've made it as far as being able to isolate the report files in a foreach loop, but am not sure how to assign the datasource property.

Here is what I have so far:

$web = Get-SPWeb -Identity "http://contoso.com/" 
$list = $web.GetList("http://contoso.com/ReportLibrary") 

$folderUrl=($list.RootFolder.url) 
$folder = $web.GetFolder($folderUrl)

foreach ($file in $folder.Files) { 
    If ($file.name.EndsWith(".rdl"))  {
        write-host $file.Name
    }
}

I guess I could write a console app to do this, but I'm trying to learn how to make my life easier with Powershell. Thanks for any help offered.

On a side note, if I backup and restore the ReportServer database in the new location, would that solve this issue?

1

1 Answers

1
votes

You need to do it through the Reporting Services webservice.

Here is my approach with powershell :)