Complete the Reporting Services with SharePoint Integration configuration using PowerShell
Introduction
This Windows PowerShell script achieves the same function as we to complete configure the Reporting Services integrate to SharePoint in SharePoint Central Administration. This script applies to SQL Server Reporting Services 2008 R2 or SQL Server Reporting
Services 2008 integrate to SharePoint 2010.
Scenarios
When we need to configure SQL Server Reporting Services in SharePoint integrated mode, after installed and configured both SQL Server Reporting Services side and SharePoint side, in traditional way, we need to bind the report server URL and set authentication
type in the SharePoint Central Administration. Actually, we can also easily set these steps by using script. It is suitable for bellowing two conditions:
- Never integrated any SQL Server Reporting Services to this SharePoint.
- Had ever integrated SQL Server Reporting Services to this SharePoint, need to integrate one new SQL Server Reporting Services to this SharePoint.
Script
Customer can use this script by following below steps:
Step1: Launch the Windows PowerShell. Click Start, point to
All Programs, point to Accessories, point to
Windows PowerShell, right-click Windows PowerShell, and select
Run As Administrator.
Screenshot:

Step2: Locate to the script path and load the script into current session.
Command: . C:\Onescript\IntegrateSSRSToSharePoint.ps1
Note: Replace the C:\Onescript\ with your path.
Screenshot:

Step3: Call the advanced function Check-OSCSSRSToSP, the screen will prompt you enter in the report server URL.
Command: Integrate-OSCSSRSToSP
Screenshot:

Step5: Enter a windows domain user account as the process identity account access to the SharePoint web application.
Command: domainname\username
Screenshot:
Step6: Please enter the SharePoint website URL.
Screenshot:

Step7: Please choose the authentication type.
Screenshot:

Step8: Print result.
Screenshot:

Here are some code snippets for your references. To get the complete script sample, please click the download button at the beginning of this page.
PowerShell
Edit|Remove
powershell
$ReportServices = [array]$spfarm.Services | where-object {$_.TypeName -eq "Microsoft.ReportingServices.SharePoint.Common.SPRSServiceConfiguration"}
if ($ReportServices -ne $null)
{
$ReportServices.delete()
}
$ReportServices = [array]$spfarm.Services | where-object {$_.TypeName -eq "Microsoft.ReportingServices.SharePoint.Common.SPRSServiceConfiguration"}
if ($ReportServices -ne $null)
{
$ReportServices.delete()
}
Prerequisite
Additional Resources