Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

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") 

$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?

share|improve this question

1 Answer 1

google is your friend, try this one: http://www.softlanding.ca/Blog/Lists/Posts/Post.aspx?ID=11

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.