

$conn = New-Object .ServerConnection -ArgumentList $ env:ComputerName # Establish a connection to the database server (localhost) Import-Module sqlps -DisableNameChecking | Out-Null

# Import the SQL Server PowerShell module GenerateDatabaseCreationScript( "ReportServer ", 1033, $false).Script # Get the ReportServer and ReportServerTempDB creation script Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Force class MSReportServer_ConfigurationSetting -ComputerName localhost Return Get-WmiObject –namespace "root\Microsoft\SqlServer\ReportServer\RS_SSRS\v14\Admin " ` It will not work with earlier versions without changing the name of the Report Manager web application to ReportManager. Note: I expect this script will also work with SQL Server 2016 Reporting Services. Initialize the report server with encryption for sensitive data.Configure the virtual directory name and URL of the report manager web app.Configure the virtual directory name and URL of the web service.Set the SSRS database connection to this newly created database.Get and execute a second SQL script, this time to set the permissions for the SSRS 2017 service account.

