• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2846
  • 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?
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

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