Listing SSRS ReportServer Items Using PowerShell
Just a short tidbit on how to list your ReportServer Items using PowerShell
#note this script is tested on PowerShell v2 and SSRS 2008 R2 $ReportServerUri = "http://yourserver/ReportServer/ReportService2005.asmx"; $Proxy = New-WebServiceProxy -Uri $ReportServerUri -Namespace SSRS.ReportingService2005 -UseDefaultCredential ; #check out all members of $Proxy #$Proxy | Get-Member #http://msdn.microsoft.com/en-us/library/aa225878(v=SQL.80).aspx $items = $Proxy.ListChildren("/", $true); $items | select Type, Path, ID, Name | sort-object Type, Name
If you’re curious about the T-SQL version of retrieving the report name/path information, check out my blog on retrieving definition/roles/assignments using T-SQL. Note this was done on SQL Server 2005, some of the objects may have changed. For example in SQL Server 2005 the table that stores execution history is called ExecutionLog. In SQL Server 2008 R2, it’s called ExecutionLogStorage.
If you’re still using PowerShell v1, check out my other blog post on programmatically adding users/groups using PowerShell. That PowerShell script will work on v1.