Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
Anonymous
Not applicable

Configuring Power BI Server through Power shell

Hi,

If you want to install Power BI Server through powershell (SQL Server 2016 and PoweBI Server(March 2018))

you can use following commands

 

 

 

$rsConfig = Get-WmiObject –namespace "root\Microsoft\SqlServer\ReportServer\RS_PBIRS\v15\Admin" -class MSReportServer_ConfigurationSetting   -filter "InstanceName='PBIRS'"

 

$methResult = $rsConfig.GenerateDatabaseCreationScript($PowerBIDatabaseName, 1033, "true")

Invoke-SqlCmd

Set-Location SQLSERVER:\SQL\$SQLServerName\$InstanceName

invoke-sqlcmd -Query $methResult["Script"] -Username $UserName -Password $Password -OutputSqlErrors $true | Out-Null

 

Set-Location -Path C:\Windows\System32

$methResult = $rsconfig.GenerateDatabaseRightsScript("NT Service\PowerBIReportServer", $PowerBIDatabaseName, $false, $true)

Set-Location SQLSERVER:\SQL\$SQLServerName\$InstanceName

invoke-sqlcmd -Query $methResult["Script"] -Username $UserName -Password $Password -OutputSqlErrors $true | Out-Null

 

Set-Location -Path C:\Windows\System32

$rsConfig.SetDatabaseConnection($SQLServerInstanceName,$PowerBIDatabaseName, 2, "NT Service\PowerBIReportServer", "")

 

$rsConfig.SetVirtualDirectory("ReportServerWebService",$WebServiceVirtualDirectoryName,0)

$rsConfig.ReserveURL("ReportServerWebService", "http://+:80", 1033)

$rsConfig.SetVirtualDirectory("ReportServerWebApp",$WebPortalVirtualDirectoryName,0)

$rsConfig.ReserveURL("ReportServerWebApp", "http://+:80", 1033)

$rsConfig.ReserveURL("PowerBIWebApp", "http://+:80", 1033)

$rsConfig.ReserveURL("OfficeWebApp", "http://+:80", 1033)

 

$rsconfig.SetServiceState($false, $false, $false)

Restart-Service $rsConfig.ServiceName

$rsconfig.SetServiceState($true, $true, $true)

 

 

Older SQL 

The version in following command must be updated

$rsConfig = Get-WmiObject –namespace "root\Microsoft\SqlServer\ReportServer\RS_PBIRS\v15\Admin" -class MSReportServer_ConfigurationSetting   -filter "InstanceName='PBIRS'"
To get the version use following command:      

gwmi -namespace "root\Microsoft\SqlServer\ReportServer\RS_PBIRS" -class "__Namespace"

 

Also in following commands: 

$rsConfig.SetVirtualDirectory("ReportServerWebApp",$WebPortalVirtualDirectoryName,0)

$rsConfig.ReserveURL("ReportServerWebApp", "http://+:80", 1033)

"ReportServerWebApp"

should be changed to 

"ReportManager"

 

 

 

0 REPLIES 0

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

Check out the April 2026 Power BI update to learn about new features.

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Users online (2,267)