Update Data Sources inside SSRS reports programatically through scripts?

  • I have few sql instances running SSRS 2012. These instances have several reports and report folders with data sources.

    1) I want to pull all the data source information including the windows service account used along with connection string.
    2) Second, I want to update the passwords for the data sources i.e. the windows service account passwords in the data source connection string through script.
    Is it possible to accomplish this through powershell or other scripting methods? 

    Thanks!

  • RJ-476420 - Monday, June 4, 2018 5:59 PM

    I have few sql instances running SSRS 2012. These instances have several reports and report folders with data sources.

    1) I want to pull all the data source information including the windows service account used along with connection string.
    2) Second, I want to update the passwords for the data sources i.e. the windows service account passwords in the data source connection string through script.
    Is it possible to accomplish this through powershell or other scripting methods? 

    Thanks!

    Yes.
    For Powershell, look at importing and using the ReportingServicesTools module. Check Get/Set-RsDataSource and Set-RsDataSourcePassword. Examples are with the help file for the module
    ReportingServicesTools

    Other scripting methods can be used with the web services. Check the Get/SetDataSourceContents which also has examples
    SetDataSourceContents

    There is also the rs.exe utility that you can pass VBScript file to execute the web services methods.
    RS.exe Utility (SSRS)

    You can search on any of the methods/cmdlets you want to use and find more examples.

    Sue

  • Sue_H - Monday, June 4, 2018 7:51 PM

    RJ-476420 - Monday, June 4, 2018 5:59 PM

    I have few sql instances running SSRS 2012. These instances have several reports and report folders with data sources.

    1) I want to pull all the data source information including the windows service account used along with connection string.
    2) Second, I want to update the passwords for the data sources i.e. the windows service account passwords in the data source connection string through script.
    Is it possible to accomplish this through powershell or other scripting methods? 

    Thanks!

    Yes.
    For Powershell, look at importing and using the ReportingServicesTools module. Check Get/Set-RsDataSource and Set-RsDataSourcePassword. Examples are with the help file for the module
    ReportingServicesTools

    Other scripting methods can be used with the web services. Check the Get/SetDataSourceContents which also has examples
    SetDataSourceContents

    There is also the rs.exe utility that you can pass VBScript file to execute the web services methods.
    RS.exe Utility (SSRS)

    You can search on any of the methods/cmdlets you want to use and find more examples.

    Sue

    Great! Thank you Sue. I will look into this and customize it for my needs.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply