Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2716
  • Last Modified:

Powershell or VB RSS Script to remove RDL files from SSRS

We have an odd challenge - I need to find a way to remove all RDL files from SQL Reporting Services 2008.  The reports all are save in http://servername/reports, and we want to delete EVERYTHING with the exception of a directory named DefaultReports.
I have found Powershell script to export these items or add additional RDL files, but not delete them.
Any assistance would be appreciated!
1 Solution
Rainer JeschorCommented:
Brent ChallisPrincipal: ITCommented:
Reporting Services comes with a command line utility called rs.exe.  This utility is designed to make it very easy to write code to work with SSRS.  You need to create a script file the rs can use to execute against the SSRS web service.

To use it, it is simply a case of:
RS.exe -i scriptfilename -s serverurl (probably http://servername/reportserver)

Here is a reference to some code that will delete reports from an SSRS server:

ScudboyAuthor Commented:
Thank you!  This was perfect and worked very well.  

Powershell for some reason just hand me chasing my tail, and I had yet to find code that actually worked - it really took the RSS script run with the rs.exe utility to get the job done.
What do I need to do to make it link to a data source in a different folder than where the reports exist?

Featured Post

Get free NFR key for Veeam Availability Suite 9.5

Veeam is happy to provide a free NFR license (1 year, 2 sockets) to all certified IT Pros. The license allows for the non-production use of Veeam Availability Suite v9.5 in your home lab, without any feature limitations. It works for both VMware and Hyper-V environments

Tackle projects and never again get stuck behind a technical roadblock.
Join Now