Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hi,
I need to upload my Power BI Report files to Power BI Report Server. I have tried with PowerShell Utility ReportingServicesTools for SSRS Report and able to publish the SSRS reports in Power BI Report Server, but the same code is not working for PBIX files. I am able to publish using Power BI Desktop (October 2017) and able to upload through Power BI Reporting portal.
Is there any option available to upload the Power BI Report files(PBIX) to On Prime Power BI Report Server using
Thanks,
Navaneethakrishnan Thangaraj
Solved! Go to Solution.
Hi Navaneethakrishnan,
Try the Write-RsRestCatalogItem PowerShell command (https://github.com/Microsoft/ReportingServicesTools/blob/master/ReportingServicesTools/Functions/Cat...)
Hope this helps,
Krisztian
Hi Navaneethakrishnan,
Try the Write-RsRestCatalogItem PowerShell command (https://github.com/Microsoft/ReportingServicesTools/blob/master/ReportingServicesTools/Functions/Cat...)
Hope this helps,
Krisztian
Hi,
Could you give any additional pointers? I am trying to do the same thing and I have tried dozens of shell commands by now. Most of them don't return an error, but none of them results in the report being published to the report server. What am I doing wrong? Is there some sort of logging?
This is part of what I have tried so far:
PS F:\> ./Write-RsCatalogItem -ReportServerUri 'http://localhost:8080/reports' -Path f:\test.pbix
PS F:\> ./Write-RsCatalogItem -ReportServerUri 'http://localhost/reports' -Path f:\test.pbix
PS F:\> ./Write-RsCatalogItem -ReportServerUri 'http://localhost/reports' -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsCatalogItem -ReportServerUri 'http://localhost:8080/reports' -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsCatalogItem -ReportServerUri "http://localhost:8080/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsCatalogItem -ReportServerUri "http://localhost:80/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsRestCatalogItem -ReportServerUri "http://localhost:80/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsRestCatalogItem -ReportServerUri "http://localhost/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsRestCatalogItem -ReportServerUri "http://bidb01a/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri "http://bidb01a/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri "http://localhost/reports" -Path f:\test.pbix -rsfolder /Archief
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri "http://localhost/reports" -Path f:\test.pbix
PS F:\> ./Write-RsRestCatalogItem -Path f:\test.pbix
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri 'http://bidb01a:8080/Reports' -Path f:\test.pbix
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri 'http://bidb01a:8080/Reports' -Path f:\test.pbix
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri 'http://bidb01a:8080/Reports' -Path 'f:\test.pbix'
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri 'http://localhost:8080/Reports' -Path 'f:\test.pbix'
PS F:\> ./Write-RsRestCatalogItem -ReportPortalUri 'http://localhost/Reports' -Path 'f:\test.pbix'
PS F:\> '
Thanks!
http://byobi.com/2018/04/programmatically-deploy-power-bi-reports-to-power-bi-report-server/
Try creating a session to your report server like the link shows. I'll replace some variables in the code below.
$session = New-RsRestSession -ReportPortalUri X
Write-RsRestCatalogItem -WebSession $session -Path Y -RsFolder Z
Let me know if it works.
Hi,
In this post, he mentioned about datasource connection string update, but this is not working, I have posted in separate thread.
As per Jon-Heide reply, as of now connection string update is not supporting for Power BI Reports after publish.
Kindly let me know if this is working for you.
Thanks,
Navaneethakrishnan Thangaraj
Thank you for your reply.
I looked at the documentation under the link. Seems straight forward. I am still struggeling somewhat. First of all: our development machine is a Windows Server 2012, whereas the A and P machines are Windows Server 2016.
So, on the development server I first needed to run "PackageManagement_x64.msi" in order to be able to use "Install-Module" in the first place.
Next up, unfortunately, none of our servers are connected to the internet, so there is no way to have the server download "nuget" automatically as soon as it is needed (which is right after running the "Install-Module" command I guess).
Tried a "solution" that I found to copy the file Microsoft.PackageManagement.NuGetProvider.dll from a Windows 10 machine that does have internet. But then I get the next error message.
PS F:\powershell\reportingservicestools> Install-Module ReportingServicesTools
PackageManagement\Install-Package : No match was found for the specified search criteria and module name 'ReportingServ
icesTools'.
At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\PSModule.psm1:1417 char:21
+ $null = PackageManagement\Install-Package @PSBoundParameters
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Microsoft.Power....InstallPackage:InstallPackage) [Install-Package], Ex
ception
+ FullyQualifiedErrorId : NoMatchFoundForCriteria,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackage
This is getting pretty frustrating... what happened to good old command line options using the command prompt? 😞
Hi Plantje,
I had same problem to download PowerShell modules form internet. For alternate , you can download the PS module and extract it to your windows server and import it in the begining of your script file, then it will work.
Import-Module -Name F:\PowerShell\ReportingServicesTools
Thanks,
Navaneethakrishnan Thangaraj
Great! This seems to work!
So, rather than using "install-module" I can also use "Import-Module" all else is the same as it seems.
Thank you VERY VERY much!
Hi,
Once the report is uploaded on to the Report Server I wanted to input the SQL database credentials. What would be the commandline syntax to use this utility?
Thanks
That's done through the data source update, mentioned earlier in the thread. In order to do that you have to put the user name and password for the data source in the power shell script
Hi Krisztian,
Thanks for your help. It is working.
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
12 | |
6 | |
4 | |
3 | |
2 |
User | Count |
---|---|
13 | |
10 | |
5 | |
5 | |
3 |