O'Reilly logo

SQL Server 2014 with PowerShell v5 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 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\tstark as a browser and Content Manager to the customer list report.

For your environment, 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...

Let's explore the code required to add a user with a role to SSRS:

  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 $type = $Proxy.GetType().Namespace $itemPath = "/Customer Reports/Customer List" #this will hold all ...

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