cancel
Showing results for 
Search instead for 
Did you mean: 

Export All Reports, In Bulk, Via PowerShell And API

I "borrowed" KMSigma​'s PowerShell script, which exports the device templates, and converted it to export the reports.

I take absolutely 0% of the credit, as KMSigma​ had previously done all of the work.

I simply had to swap out the query, and that's about it.

Export Non-Default Device Templates

Using PowerShell, you should be able to export all of your reports, in separate XML files, to the directory of your choosing.

Exporting All Reports

The only real issue I found is naming the exported files which contain "illegal" chars, such as the "90/95/99th Percentile..." reports.

Otherwise, I was able to run this script, then import the reports back into the system without any issues.

The exported reports appeared to function/display properly once imported back into the system, and ran.

I hope this works to get you where you need to go.

Thank you,

-Will

Attachments
Comments

To deal with illegal filename characters, you could change this part:

(Join-Path -Path $exportPath -ChildPath $filename)

to this:

(Join-Path -Path $exportPath -ChildPath ($filename -replace "[^A-Za-z0-9 _]","_"))

tdanner​ Thank you for the advice... again!

I have updated the file with your suggestion.

Thank you,

-Will

That's kinda brilliant.

I just tried the updated export, that apparently worked.

However, on import at least on this one report, I get the following error:

Couldn't import report from Interface Bandwidth.xml. Error:

Expecting element 'Report' from namespace 'http://schemas.datacontract.org/2004/07/SolarWinds.Reporting.Models'.. Encountered 'Element'  with name 'Report', namespace ''.

Any ideas?

EDIT: Can we export schedules to be imported to another install? I don't see an export option on the 'manage schedules' page, nor do I see an import option.

EDIT EDIT: I got the same error on at least 3 reports that I tried to import. Not a big deal. I think all of those with errors might have been REPORT WRITER reports instead of WEB Reports.

There are over 300 included reports with the new install, I show around 375 in our old installation. Not sure how to easily compare, but if I were to attempt to import all reports from old to new would that duplicate reports? overwrite the new installs reports? outright fail?

Version history
Revision #:
1 of 1
Last update:
‎05-02-2018 05:41 PM
Updated by: