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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to Change report datasource with powershell

Hi,

im writing some powershell code to automize deployement peocess,

there is configuration part that user can upload powerbi report in any workspace

Powerbi dataset are split of powerbi reports, powerbi reports are pulished on "developmet" workspace during developmet.

and those conencted to datasource in same workspace .

problem is when user wants to deploy report to differebt workspace  name , in this case , powerbi dataset was deployed successfully but  powerbi dashboards  deployment was failed, because they connected to datasource in different worksapce name,

how powershell can change powerbi datasouce for report during deployment ?

i use this command 

New-PowerBIReport -Path $datasetName -WorkspaceId $worksapceid -ConflictAction CreateOrOverwrite

 

 

1 REPLY 1
GilbertQ
Super User
Super User

Hi @Anonymous 

 

What about using deployment pipelines to move the reports from Dev to prod?

 

Introducing Power BI deployment pipelines (Preview) | Microsoft Power BI Blog | Microsoft Power BI

 

With regards to the powershell script I think that there is no other way to get it changed with a different dataset.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!







Power BI Blog

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors
Top Kudoed Authors