The below mentioned script will take care of the steps listed below,

  1. Installs Reporting Services service and service proxy, and starts the service.2
  2. Creates a service proxy named “Reporting Services”.
  3. Creates a Reporting Services service application named “Reporting Services Application”.
  4. Enables the Power View feature for a site collection.

#Script for SSRS Configuration in SharePoint Integrated mode

  1. $starttime=Get-Date
  2. write-host -foregroundcolor DarkGray StartTime>> $starttime
  3. Write-Host -ForegroundColor Green "Import the SharePoint PowerShell snappin"
  4. Add-PSSnapin Microsoft.Sharepoint.Powershell –EA 0
  5. Write-Host -ForegroundColor Green "Install SSRS Service and Service Proxy, and start the service"
  6. Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
  7. Write-Host -ForegroundColor Green "Install the Reporting Services Shared Service"
  8. Install-SPRSService
  9. Write-Host -ForegroundColor Green " Install the Reporting Services Service Proxy"
  10. Install-SPRSServiceProxy
  11. # Get the ID of the RS Service Instance and start the service
  12. Write-Host -ForegroundColor Green "Start the Reporting Services Service"
  13. $RS = Get-SPServiceInstance | Where {$_.TypeName -eq "SQL Server Reporting Services Service"}
  14. Start-SPServiceInstance -Identity $RS.Id.ToString()
  15. # Wait for the Reporting Services Service to start...
  16. $Status = Get-SPServiceInstance $RS.Id.ToString()
  17. While ($Status.Status -ne "Online")
  18. {
  19. Write-Host -ForegroundColor Green "SSRS Service Not Online...Current Status = " $Status.Status
  20. Start-Sleep -Seconds 2
  21. $Status = Get-SPServiceInstance $RS.Id.ToString()
  22. }
  23. $time=Get-Date
  24. write-host -foregroundcolor DarkGray StartTime>> $starttime
  25. write-host -foregroundcolor DarkGray $time
  26. Write-Host -ForegroundColor Green "Create a new application pool and Reporting Services service application"
  27. Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
  28. Write-Host -ForegroundColor Green "Create a new application pool"
  29. #!!!! update "-Account" with an existing Managed Service Account
  30. New-SPServiceApplicationPool -Name "Reporting Services" -Account "<domain>\User name>"
  31. $appPool = Get-SPServiceApplicationPool "Reporting Services"
  32. Write-Host -ForegroundColor Green " Create the Reporting Services Service Application"
  33. #!!!! Update "-DatabaseServer", an instance of the SQL Server database engine
  34. $rsService = New-SPRSServiceApplication -Name "Reporting Services Application" -ApplicationPool $appPool -DatabaseName "Reporting_Services_Application" -DatabaseServer "<server name>"
  35. Write-Host -ForegroundColor Green "Create the Reporting Services Service Application Proxy"
  36. $rsServiceProxy = New-SPRSServiceApplicationProxy -Name "Reporting Services Application Proxy" -ServiceApplication $rsService
  37. Write-Host -ForegroundColor Green "Associate service application proxy to default web site and grant web applications rights to SSRS application pool"
  38. Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
  39. # Associate the Reporting Services Service Applicatoin Proxy to the default web site...
  40. Get-SPServiceApplicationProxyGroup -default | Add-SPServiceApplicationProxyGroupMember -Member $rsServiceProxy
  41. $time=Get-Date
  42. write-host -foregroundcolor DarkGray StartTime>> $starttime
  43. write-host -foregroundcolor DarkGray $time
  44. Write-Host -ForegroundColor Green "Enable the PowerView and reportserver site features"
  45. Write-Host -ForegroundColor Green ">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>"
  46. #!!!! Update "-url" of the site where you want the features enabled
  47. Enable-SPfeature -identity "powerview" -Url http://server/sites/bi
  48. Enable-SPfeature -identity "reportserver" -Url http://server/sites/bi
  49. ####To Verify, you can run the following:
  50. #Get-SPRSServiceApplication
  51. #Get-SPServiceApplicationPool | where {$_.name -like "reporting*"}
  52. #Get-SPRSServiceApplicationProxy