We help IT Professionals succeed at work.

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!
Comment
Watch Question

CERTIFIED EXPERT
Most Valuable Expert 2013
Awarded 2012

Commented:
Principal: IT
CERTIFIED EXPERT
Commented:
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:

http://social.msdn.microsoft.com/Forums/is/sqlreportingservices/thread/203eeab8-9943-4282-a41a-8fda86e42aa2

Author

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?