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

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.

Reply
Anonymous
Not applicable

PowerShell - deploy and Update PBIX on Report Server

Hello Community, 

 

I have used theses lines in order to deploy a pbix file on Report Server : 

 

$session = New-RsRestSession -ReportPortalUri http://lservername/Reports
Write-RsRestCatalogItem -WebSession $session -Path "C:\2019\mypbix.pbix" -RsFolder "/MyFolder"

It is working fine. 

Now, when I need to update the bix with another version , I used the same command bellow but I am getting this error : 

Write-RsRestCatalogItem : System.Exception: Failed to create catalog item: The remote server returned an error: (409) Conflict. ---> System.Net.WebException: The remote server returned an
error: (409) Conflict.
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.GetResponse(WebRequest request)
at Microsoft.PowerShell.Commands.WebRequestPSCmdlet.ProcessRecord()
--- End of inner exception stack trace ---
At line:1 char:1
+ Write-RsRestCatalogItem -WebSession $session -Path "C:\2019\PwC Acade ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Write-RsRestCatalogItem

 

Does any one please have an idea about hte command PowerShell that could update  apbix previously on the Server please by a new version ?

 

Many thanks

Best Regards,

Asma

2 REPLIES 2
JimTheBIGuy
Helper I
Helper I

I am having the same issue. This seems to have started after the upgrade to the Power BI report server Oct 2020 version. I can run the PowerShell script on the TFS build server but it fails for several reports (not all) when I run this through the DevOps build using a build service account. It is not consistent on which reports publish and which don't reports in the same location on the report server work fine while others fail.

Anonymous
Not applicable

Hi Asma,

same issue on my side, even if I put -overwrite option.
Did you find a solution ?

regards

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.