SQL

Exporting All SSRS Reports

Posted February 11, 2023

By Kevin Schwickrath1 min read

I want to backup reports within SSRS with a bulk export.

Prerequisites

  • Make sure you’re using the latest version of PowerShell
  • Install the needed modules:
Terminal window
Install-Module -Name ReportingServicesTools

PowerShell likes things to be digitally signed. To run this script without signing run the following:

Terminal window
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

This command will set the execution policy to “bypass” for the current PowerShell session.

Script

Find the version of SSRS you’re using. In SSRS, click => help => About SQL Server Reporting Services. Modify your URI as needed:

  • For SSRS 2010 - $sourceRsUri = 'ReportServerURL/ReportServer/ReportService2010.asmx?wsdl'

  • For SSRS 2019 - $sourceRsUri = 'ReportServerURL/ReportServer/ReportService2019.asmx?wsdl'

Set you’re export location. In my case I want to save everything to D:\SSRS_Out

Save this file as SSRS.ps1

Terminal window
#Lets get security on all folders in a single instance
#Declare SSRS URI
$sourceRsUri = "http://sqlhostname:80/ReportServer/ReportService2019.asmx?wsdl"
#Declare Proxy so we don't need to connect with every command
$proxy = New-RsWebServiceProxy -ReportServerUri $sourceRsUri
#Output ALL Catalog items to file system
Out-RsFolderContent -Proxy $proxy -RsFolder / -Destination 'D:\SSRS_Out' -Recurse

Export Data

Run our script

Terminal window
cd D:\SSRS_Out\
.\SSRS.ps1

Enjoy your reporting on reports of reportness.

Inspirational Source:
https://stackoverflow.com/questions/46783093/download-all-ssrs-reports

This post is licensed under CC BY 4.0 by the author.

Related Posts

SQL Search Objects Names

SQL · Feb 15, 2023 · 1 min read

Let's say you have several databases on a Microsoft SQL Server, each with loads of tables. Now you want to find a table with the word 'users' in the table…