Here is a PowerShell script that can be used to export subscriptions from one Microsoft SQL Server Reporting Services (SSRS) server and import them to another SSRS server:
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.Management.ReportingServices")
$sourceServer = "SourceServerName"
$sourceSsrs = New-WebServiceProxy -Uri "http://$sourceServer/ReportServer/ReportService2010.asmx?WSDL" -Namespace SSRS.ReportingService2010 -UseDefaultCredential
$subscriptions = $sourceSsrs.ListSubscriptions("/")
$subscriptions | Select-Object Path, Report, EventType, @{Name="DeliveryExtension";Expression={$_.Extension}}, @{Name="Description";Expression={$_.Description}} | Export-Csv "Subscriptions.csv" -NoTypeInformation
$sourceSsrs = $null
$destinationServer = "DestinationServerName"
$destinationSsrs = New-WebServiceProxy -Uri "http://$destinationServer/ReportServer/ReportService2010.asmx?WSDL" -Namespace SSRS.ReportingService2010 -UseDefaultCredential
$subscriptions = Import-Csv "Subscriptions.csv"
foreach ($subscription in $subscriptions)
{
$newSubscription = New-Object Microsoft.SqlServer.Management.ReportingServices.Execution.ReportExecutionService.Subscription
$newSubscription.Path = $subscription.Path
$newSubscription.Extension = $subscription.DeliveryExtension
$newSubscription.EventType = [Microsoft.SqlServer.Management.ReportingServices.Execution.ReportExecutionService.EventType]::$($subscription.EventType)
$newSubscription.Description = $subscription.Description
$destinationSsrs.CreateSubscription($newSubscription)
}
$destinationSsrs = $null
This script starts by loading the ReportingServices libraries and connecting to the source SSRS server using the New-WebServiceProxy cmdlet. It then retrieves a list of all subscriptions on the source SSRS server using the ListSubscriptions method of the $sourceSsrs object.
The list of subscriptions is then exported to a CSV file using the Export-Csv cmdlet. The properties that are exported include the path of the report, the name of the report, the type of event that triggers the subscription, the delivery extension used to send the report, and the description of the subscription.
The script then disconnects from the source SSRS server and connects to the destination SSRS server using the New-WebServiceProxy cmdlet. The subscriptions from the CSV file are then imported and used to create new subscriptions on the destination SSRS server using