Since we're migrating to a new HCO installation and starting with a clean database I needed a way of getting all the Alerts, SAM Templates and Reports across to the new install. Scripts to export and import all of those are available, with a little hacking, apart from Reports. I've created a script based on (I think) KMSigma's 'import alerts' script and changed the SWIS command based on the fields from orion.report.createreport in SWQL Studio.
On the old poller, use exportReports.ps1 found on these forums, zip up and copy the exported XML files to the new primary poller, then unzip into a temp directory. Download the script on the new poller and set $hostname to be the IP or FQDNr, change the location of the Get-ChildItem cmdlet to be where you unzipped the reports. The script should import them all and show the ReportIDs of each one.
Tested on 2024.2.
Thanks to Thwack contributors for giving me all the breadcrumbs I needed to work out how to do this.