Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By : Donabel Santos
Book Image

SQL Server 2014 with PowerShell v5 Cookbook

By: Donabel Santos

Overview of this book

Table of Contents (21 chapters)
SQL Server 2014 with PowerShell v5 Cookbook
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Listing SSRS report properties


In this recipe, we will list a single SSRS report's properties.

Getting ready

To follow this recipe, first identify your SSRS 2012 Report Server URL. We will need to reference the ReportService2010 web service, and you can reference it using

<ReportServer URL>/ReportService2010.asmx

You also need to specify your Report Manager URI in the $reportServerUri variable.

Lastly, pick a report deployed in your SSRS 2012 Report Manager. Note the path to the report item, and replace the $reportPath variable with your own path.

How to do it...

Here are the steps required to list SSRS report properties:

  1. Open PowerShell ISE as an administrator.

  2. Add the following script and run it:

    $reportServerUri  = "http://localhost/ReportServer/ReportService2010.asmx"
    $proxy = New-WebServiceProxy -Uri $reportServerUri -UseDefaultCredential
    
    $reportPath = "/Customer Reports/Customer List"
    
    #list this report's properties
    $proxy.ListChildren("/", $true) |
    Where-Object Path -eq $reportPath

    A...