Powershell: ReportingServicesTools. Download ALL RDL files from a SSRS server.

Can you download all of the RDL files from a SSRS server? You sure can, and it is easy using PowerShell and the ReportingServicesTools module.

In a previous posting: https://jimsalasek.com/2023/05/09/powershell-reportingservicestools-download-all-rdl-files-from-a-ssrs-folder/ I showed you how to download all reports from a specific folder on the reporting server. Please follow that link on instructions on how to install ReportingServicesTools in PowerShell.

Do you have it installed? No? I’ll wait……Good, now let us continue.

Below is a listing of my reporting server. There are over 500 reports and to download each file individually would take hours.

First create a directory you want to save all of the RDL files to. I have created a directory called c:\temp\reports. The directory is empty.

Now open up PowerShell as an administrator, and type in the following command (all on 1 line): -rsfolder / is used to copy all reports and folders from the server. -destination is the location you want the reports to go to. The most important thing is the -Recurse at the end. If you omit this, no reports will be downloaded as I found out the first time I ran this command.

out-rsfoldercontent -ReportServerUri 'http://etlsqldb/ReportServer' -rsfolder / -destination c:\temp\reports -Recurse

After this command finishes in approx 1-2 minutes, I look in the c:\temp\reports directory and we have folders for every report on the SSRS server.

Looking in one of the folders, we can see a RDL file.

If we open up the RDL file in Notepad++, we can see all of the code is there. Now we can take this RDL and open it up in Visual Studio and make modifications to the report and deploy it to the SSRS server.

For more information on ReportingServicesTools, here is a link to the Github repository. https://github.com/microsoft/ReportingServicesTools

Leave a comment