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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Powershell to update datasource URL's

Hi Everyone,

 

I am working on a automated deployment system that deploys  PowerBI reports to a new workspace. This is all working fine but the issue i am having is updating the datasource with a new URL to get their information from. These are all SharePoint List data sources that need to be updated.

 

I am using the Invoke-PowerBIRestMethod  to sucessfull get the data sources within a report and I can manipulate the return to change the URL but when sending the update back i just get an error.

No information is given with the error it just doesn't work.

 

Does anyone have a working example of updatiung a datasource with powershell?

 

I have seen this thread but it doesn't have a solution 

https://community.powerbi.com/t5/Developer/Power-BI-REST-API-via-Powershell-Create-Datasource/td-p/5...

1 REPLY 1
Jayendran
Solution Sage
Solution Sage

Hi @Anonymous ,

 

Try to find the error using Resolve-PowerBIError cmdlet or fiddler to capture the API error directly.

 

Just giving as the reference, to my artilce where you can find the some informations on the powershell scripts 

https://community.powerbi.com/t5/Community-Blog/PowerBI-CICD-using-Azure-DevOps/ba-p/769244

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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