SQL Server 2014 Reporting Services SharePoint 모드를 설치하면 SharePoint 모드에서 보고서 서버를 지원하도록 PowerShell cmdlet이 설치됩니다. cmdlet은 세 가지 기능 범주를 다룹니다.
Reporting Services SharePoint 공유 서비스 및 프록시 설치
Reporting Services 서비스 애플리케이션 및 관련 프록시의 프로비전 및 관리.
Reporting Services 기능 관리(예: 확장 및 암호화 키)
| 적용 대상: Reporting Services SharePoint 모드 |
이 항목에는 다음이 포함됩니다.
Cmdlet 요약
cmdlet을 실행하려면 SharePoint 관리 셸을 열어야 합니다. Microsoft Windows, Windows PowerShell ISE(통합 스크립팅 환경)에 포함된 그래픽 사용자 인터페이스 편집기를 사용할 수도 있습니다. 자세한 내용은 Windows Server에서 Windows PowerShell 시작을 참조하세요. 다음 cmdlet 요약에서 서비스 애플리케이션 '데이터베이스'에 대한 참조는 Reporting Services 서비스 애플리케이션에서 만들고 사용하는 모든 데이터베이스를 참조합니다. 여기에는 구성, 경고 및 임시 데이터베이스가 포함됩니다.
PowerShell 예제를 입력할 때 다음과 유사한 오류 메시지가 표시되는 경우:
- Install-SPRSService: 'Install-SPRSService'라는 용어가 유효한 명령으로 인식되지 않습니다.
cmdlet, 함수, 스크립트 파일 또는 실행 가능한 프로그램의 이름입니다. 이름의 철자를 확인하거나 경로가 포함된 경우 경로가 올바른지 확인하고 다시 시도합니다.
다음 문제 중 하나가 발생합니다.
Reporting Services SharePoint 모드가 설치되지 않았으므로 Reporting Services cmdlet이 설치되지 않습니다.
SharePoint 관리 셸 대신 Windows PowerShell 또는 Windows PowerShell ISE에서 PowerShell 명령을 실행했습니다. SharePoint 관리 셸을 사용하거나 다음 명령을 사용하여 Windows PowerShell 창에 SharePoint 스냅인을 추가합니다.
Add-PSSnapin Microsoft.SharePoint.PowerShell
자세한 내용은 Windows PowerShell을 사용하여 SharePoint 2013 (https://technet.microsoft.com/library/ee806878.aspx)을 관리하세요.
SharePoint 관리 셸을 열고 cmdlet을 실행하려면
시작 단추 클릭
Microsoft SharePoint 제품 그룹을 클릭합니다.
SharePoint 관리 셸을 클릭합니다.
cmdlet에 대한 명령줄 도움말을 보려면 PowerShell 명령 프롬프트에서 PowerShell 'Get-Help' 명령을 사용합니다. 다음은 그 예입니다.
Get-Help Get-SPRSServiceApplicationServers
공유 서비스 및 프록시 Cmdlet
다음 표에는 Reporting Services SharePoint 공유 서비스에 대한 PowerShell cmdlet이 포함되어 있습니다.
| Cmdlet (커맨드렛) | 설명 |
|---|---|
| Install-SPRSService | Reporting Services 공유 서비스를 설치 및 등록하거나 제거합니다. 이 작업은 SharePoint 모드에서 SQL Server Reporting Services를 설치한 컴퓨터에서만 수행할 수 있습니다. 설치의 경우 다음 두 가지 작업이 발생합니다. 1) Reporting Services 서비스가 팜에 설치됩니다. 2) Reporting Services 서비스 인스턴스가 현재 컴퓨터에 설치됩니다. 제거의 경우 두 가지 작업이 발생합니다. 1) Reporting Services 서비스가 현재 컴퓨터에서 제거됩니다. 2) Reporting Services 서비스가 팜에서 제거됩니다. 참고: 팜에 Reporting Services 서비스가 설치된 다른 컴퓨터가 있거나 팜에서 여전히 Reporting Services 서비스 애플리케이션이 실행 중인 경우 경고 메시지가 표시됩니다. |
| Install-SPRSServiceProxy | SharePoint 팜에서 Reporting Services 서비스 프록시를 설치 및 등록하거나 제거합니다. |
| Get-SPRSProxyUrl | Reporting Services 서비스에 액세스하기 위한 URL을 가져옵니다. |
| Get-SPRSServiceApplicationServers | Reporting Services 공유 서비스의 설치가 포함된 로컬 SharePoint 팜의 모든 서버를 가져옵니다. 이 cmdlet은 Reporting Services 업그레이드에 유용하며, 공유 서비스를 실행하는 서버를 결정하므로 업그레이드해야 합니다. |
서비스 애플리케이션 및 프록시 커맨드렛 Cmdlet
다음 표에는 Reporting Services 서비스 애플리케이션 및 관련 프록시에 대한 PowerShell cmdlet이 포함되어 있습니다.
| Cmdlet | 설명 |
|---|---|
| Get-SPRSServiceApplication | 하나 이상의 Reporting Services 서비스 응용 프로그램 개체를 가져옵니다. |
| New-SPRSServiceApplication | 새 Reporting Services 서비스 애플리케이션 및 관련 데이터베이스를 만듭니다. LogonType 매개 변수: 보고서 서버가 SSRS 애플리케이션 풀 계정 또는 SQL Server 로그인을 사용하여 보고서 서버 데이터베이스에 액세스하는지 여부를 지정합니다. 다음 중 하나일 수 있습니다. 0 Windows 인증 1 SQL Server 2 애플리케이션 풀 계정(기본값) |
| Remove-SPRSServiceApplication | 지정된 Reporting Services 서비스 애플리케이션을 제거합니다. 그러면 연결된 데이터베이스도 제거됩니다. |
| Set-SPRSServiceApplication | 기존 Reporting Services 서비스 애플리케이션의 속성을 편집합니다. |
| New-SPRSServiceApplicationProxy | 새 Reporting Services 서비스 애플리케이션 프록시를 만듭니다. |
| Get-SPRSServiceApplicationProxy | Reporting Services 서비스 애플리케이션 프록시를 하나 이상 가져옵니다. |
| Dismount-SPRSDatabase | Reporting Services 서비스 애플리케이션에 대한 서비스 애플리케이션 데이터베이스를 분리합니다. |
| Remove-SPRSDatabase | Reporting Services 서비스 애플리케이션에 대한 서비스 애플리케이션 데이터베이스를 제거합니다. |
| Set-SPRSDatabase | Reporting Services 서비스 애플리케이션에 연결된 데이터베이스의 속성을 설정합니다. |
| Mount-SPRSDatabase | Reporting Services 서비스 애플리케이션에 대한 데이터베이스를 탑재합니다. |
| New-SPRSDatabase | 지정된 Reporting Services 서비스 애플리케이션에 대한 새 서비스 애플리케이션 데이터베이스를 만듭니다. |
| Get-SPRSDatabaseCreationScript | Reporting Services 서비스 애플리케이션의 화면에 데이터베이스 만들기 스크립트를 출력합니다. 그런 다음 SQL Server Management Studio에서 스크립트를 실행할 수 있습니다. |
| Get-SPRSDatabase | 하나 이상의 Reporting Services 서비스 애플리케이션 데이터베이스를 가져옵니다. 서비스 애플리케이션 데이터베이스의 ID를 가져오려면 명령어를 사용해 주세요. 그런 다음 Set-SPRSDatabase cmdlet을 사용하여 querytimeout 속성을 수정할 수 있습니다. 이 항목의 예제, Reporting Servicea 애플리케이션 데이터베이스의 속성 가져오기 및 설정(예: 데이터베이스 시간 제한)을 참조하세요. |
| Get-SPRSDatabaseRightsScript | Reporting Services 서비스 애플리케이션의 화면에 데이터베이스 권한 스크립트를 출력합니다. 원하는 사용자 및 데이터베이스에 대한 프롬프트를 표시한 다음, 사용 권한을 수정하기 위해 실행할 수 있는 트랜잭션 SQL을 반환합니다. 그런 다음 SQL Server Management Studio에서 이 스크립트를 실행할 수 있습니다. |
| Get-SPRSDatabaseUpgradeScript | 데이터베이스 업그레이드 스크립트를 화면에 출력합니다. 스크립트는 Reporting Services 서비스 애플리케이션 데이터베이스를 현재 Reporting Services 설치의 데이터베이스 버전으로 업그레이드합니다. |
Reporting Services 사용자 지정 기능 Cmdlet
| Cmdlet (커맨드렛) | 설명 |
|---|---|
| Update-SPRSEncryptionKey | 지정된 Reporting Services 서비스 애플리케이션의 암호화 키를 업데이트하고 해당 데이터를 다시 암호화합니다. |
| Restore-SPRSEncryptionKey | Reporting Services 서비스 애플리케이션에 대해 이전에 백업된 암호화 키를 복원합니다. |
| Remove-SPRSEncryptedData | 지정된 Reporting Services 서비스 애플리케이션에 대한 암호화된 데이터를 삭제합니다. |
| Backup-SPRSEncryptionKey | 지정된 Reporting Services 서비스 애플리케이션에 대한 암호화 키를 백업합니다. |
| New-SPRSExtension | Reporting Services 서비스 애플리케이션에 새 확장을 등록합니다. |
| Set-SPRSExtension | 기존 Reporting Services 확장의 속성을 설정합니다. |
| Remove-SPRSExtension | Reporting Services 서비스 애플리케이션에서 확장을 제거합니다. |
| Get-SPRSExtension | Reporting Services 서비스 애플리케이션에 대한 하나 이상의 Reporting Services 확장을 가져옵니다. 유효한 값은 다음과 같습니다. 배달 DeliveryUI 렌더링 데이터 보안 인증 EventProcessing ReportItems 디자이너 ReportItemDesigner ReportItemConverter ReportDefinitionCustomization |
| Get-SPRSSite | "ReportingService" 기능을 사용할 수 있는지 여부에 따라 SharePoint 사이트를 가져옵니다. 기본적으로 "ReportingService" 기능을 사용하도록 설정하는 사이트가 반환됩니다. |
기본 샘플
이름에 'SPRS'가 포함된 cmdlet 목록을 반환합니다. Reporting Services cmdlet의 전체 목록이 됩니다.
Get-command -noun *SPRS*
또는 좀 더 자세히 commandlist.txt라는 텍스트 파일로 파이프 처리됩니다.
Get-Command -Noun *SPRS* | Select name, definition | Format-List | Out-File c:\commandlist.txt
Reporting Services SharePoint 서비스 및 서비스 프록시를 설치합니다.
Install-SPRSService
Install-SPRSServiceProxy
Reporting Services 서비스 시작
Get-SPServiceInstance -all | where {$_.TypeName -like "SQL Server Reporting*"} | Start-SPServiceInstance
SharePoint 관리 셸에서 다음 명령을 입력하여 로그 파일에서 필터링된 행 목록을 반환합니다. 이 명령은 "ssrscustomactionerror"가 포함된 줄을 필터링합니다. 이 예제에서는 rssharepoint.msi 설치되었을 때 생성된 로그 파일을 확인합니다.
Get-Content -Path C:\Users\testuser\AppData\Local\Temp\rs_sp_0.log | Select-String "ssrscustomactionerror"
자세한 샘플
다음 샘플 외에도 1-4단계에 대한 Windows PowerShell 스크립트 항목의 "Windows PowerShell 스크립트" 섹션을 참조하세요.
Reporting Services 서비스 애플리케이션 및 프록시 만들기
이 샘플 스크립트는 다음 작업을 완료합니다.
Reporting Services 서비스 애플리케이션 및 프록시를 만듭니다. 스크립트는 애플리케이션 풀 "내 앱 풀"이 이미 있다고 가정합니다.
기본 프록시 그룹에 프록시 추가
포트 80 웹앱의 콘텐츠 데이터베이스에 대한 액세스 권한을 서비스 앱에 부여합니다. 스크립트는 "http://sitename"" 사이트가 이미 존재한다고 가정합니다.
# Create service application and service application proxy
$appPool = Get-SPServiceApplicationPool "My App Pool"
$serviceApp = New-SPRSServiceApplication "My RS Service App" -ApplicationPool $appPool
$serviceAppProxy = New-SPRSServiceApplicationProxy -Name "My RS Service App Proxy" -ServiceApplication $serviceApp
# Add service application proxy to default proxy group. Any web application that uses the default proxy group will now be able to use this service application.
Get-SPServiceApplicationProxyGroup -default | Add-SPServiceApplicationProxyGroupMember -Member $serviceAppProxy
# Grant application pool account access to the port 80 web application's content database.
$webApp = Get-SPWebApplication "http://sitename"
$appPoolAccountName = $appPool.ProcessAccount.LookupName()
$webApp.GrantAccessToProcessIdentity($appPoolAccountName)
Reporting Services 배달 확장 프로그램 검토 및 업데이트
다음 PowerShell 스크립트 예제에서는 명명 My RS Service App된 서비스 애플리케이션에 대한 보고서 서버 전자 메일 배달 확장 프로그램에 대한 구성을 업데이트합니다. SMTP 서버() 및 FROM 전자 메일 별칭(<email server name><your FROM email address>)에 대한 값을 업데이트합니다.
$app = Get-SPRSServiceApplication -Name "My RS Service App"
$emailCfg = Get-SPRSExtension -Identity $app -ExtensionType "Delivery" -Name "Report Server Email" | Select -ExpandProperty ConfigurationXml
$emailXml = [xml]$emailCfg
$emailXml.SelectSingleNode("//SMTPServer").InnerText = "<email server name>"
$emailXml.SelectSingleNode("//SendUsing").InnerText = "2"
$emailXml.SelectSingleNode("//SMTPAuthenticate").InnerText = "2"
$emailXml.SelectSingleNode("//From").InnerText = '<your FROM email address>'
Set-SPRSExtension -Identity $app -ExtensionType "Delivery" -Name "Report Server Email" -ExtensionConfiguration $emailXml.OuterXml
위의 예제에서 서비스 애플리케이션의 정확한 이름을 모르는 경우 첫 번째 문을 다시 작성하여 부분 이름 검색을 기반으로 서비스 애플리케이션을 가져올 수 있습니다. 다음은 그 예입니다.
$app = Get-SPRSServiceApplication | Where {$_.name -like " ssrs_testapp *"}
다음 스크립트는 "Reporting Services 애플리케이션"이라는 서비스 애플리케이션에 대한 보고서 서버 전자 메일 배달 확장 프로그램의 현재 구성 값을 반환합니다. 첫 번째 단계에서는 변수 $app 값을 "My RS Service App" 이름이 있는 서비스 애플리케이션의 개체로 설정합니다.
두 번째 문은 변수 $app 서비스 애플리케이션 개체에 대한 '보고서 서버 전자 메일' 배달 확장 프로그램을 가져와 configurationXML을 선택합니다.
$app = Get-SPRSServiceapplication -Name "Reporting Services Application"
Get-SPRSExtension -Identity $app -ExtensionType "Delivery" -Name "Report Server Email" | Select -ExpandProperty ConfigurationXml
위의 두 문을 하나로 다시 작성할 수도 있습니다.
Get-SPRSServiceApplication -Name "Reporting Services Application" | Get-SPRSExtension -ExtensionType "Delivery" -Name "Report Server Email" | Select -ExpandProperty ConfigurationXml
Reporting Servicea 애플리케이션 데이터베이스의 속성 가져오기 및 설정(예: 데이터베이스 시간 제한)
다음 예제에서는 먼저 데이터베이스 및 속성 목록을 반환하므로 set 명령에 제공하는 데이터베이스 GUID(ID)를 확인할 수 있습니다. 속성의 전체 목록은 다음을 사용합니다 Get-SPRSDatabase | format-list.
Get-SPRSDatabase | Select id, querytimeout,connectiontimeout, status, server, ServiceInstance
다음은 출력의 예입니다. 수정하려는 데이터베이스의 ID를 결정하고 SET cmdlet에서 ID를 사용합니다.
Id : 56f8d1bc-cb04-44cf-bd41-a873643c5a14QueryTimeout : 120ConnectionTimeout : 15Status : OnlineServer : SPServer Name=uetestb01ServiceInstance : SPDatabaseServiceInstance
Set-SPRSDatabase -Identity 56f8d1bc-cb04-44cf-bd41-a873643c5a14 -QueryTimeout 300
값이 설정되었는지 확인하려면 GET cmdlet을 다시 실행합니다.
Get-SPRSDatabase -Identity 56f8d1bc-cb04-44cf-bd41-a873643c5a14 | Select id, querytimeout,connectiontimeout, status, server, ServiceInstance
보고서 서비스 데이터 확장 목록 - SharePoint 모드
다음 예제에서는 각 Reporting Services 서비스 애플리케이션을 반복하고 각각에 대한 현재 데이터 확장을 나열합니다.
$apps = Get-SPRSServiceApplication
foreach ($app in $apps)
{
Write-host -ForegroundColor "yellow" Service App Name $app.Name
Get-SPRSExtension -identity $app -ExtensionType "Data" | select name, extensiontype | Format-Table -AutoSize
}
예제 출력:
Name ExtensionType---- -------------SQL DataSQLAZURE DataSQLPDW DataOLEDB DataOLEDB-MD DataORACLE DataODBC DataXML DataSHAREPOINTLIST Data
구독 소유자 변경 및 나열
PowerShell을 사용하여 Reporting Services 구독 소유자 변경 및 나열 및 구독 실행을 참조하세요.
또한 참조하십시오
PowerShell을 사용하여 Reporting Services 구독 소유자 변경 및 나열 및 구독 실행
검사 목록: PowerShell을 사용하여 SharePoint용 PowerPivot 확인
CodePlex SharePoint Management PowerShell 스크립트