O'Reilly logo

SQL Server 2012 with PowerShell V3 Cookbook by Donabel Santos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Adding a user with a role to an SSRS report

In this recipe, we will add a user with a few roles to SSRS.

Getting ready

In this recipe, we will add QUERYWORKS\aterra as a browser and Content Manager to the Customer Contact Numbers report.

For your environment, instead of using QUERYWORKS\aterra, you can identify a user you want to add to an existing report, and which roles you want to assign to them.

How to do it...

  1. Open the PowerShell console by going to Start | Accessories | Windows PowerShell | Windows PowerShell ISE.
  2. Add the following script and run:
    $ReportServerUri = "http://localhost/ReportServer/ReportService2010.asmx" $proxy = New-WebServiceProxy -Uri $ReportServerUri -UseDefaultCredential $type = $Proxy.GetType().Namespace $itemPath = "/Customers/Customer ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required