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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
roncruiser
Post Patron
Post Patron

Using Power Shell to update dataset parameter -Need help

Hi Everyone!
From the Power Shell command line interface, I run the commands below.  No errors are thrown but the Power BI service dataset parameters in My Workspace do not change to the new values.
Can someone please review the script  to see if I am missing something else? Maybe I am missing something.
Maybe adapt the script to try on your side and see if it runs for you.
There's documention online suggesting updating dataset parameters work.

I think maybe I am missing some access permissions to do this.  I'm unsure.
Seeking help.

Thank you!
Note: Copilot suggested inserting this in place of the variable below:
$urlUpdateParams = "https://api.powerbi.com/v1.0/me/datasets/d62b1e0c-9060-4ecf-9994-ccd995d52693/parameters"
This doesnt work either.

$urlUpdateParams = "https://app.powerbi.com/groups/me/datasets/d62b1e0c-9060-4ecf-9994-ccd995d52693/parameters"


$body = '{
  "updateDetails": [
    {
      "name": "DirectPath_NonOneDrive_JSON",
      "newValue": "\\new\source\folder\path"
    },
    {
      "name": "Start Load Date_JSON",
      "newValue": "2025-02-10"
    },
    {
      "name": "End Load Date_JSON",
      "newValue": "2025-03-30"
    }
  ]
}'

$content = 'application/json'

Invoke-PowerBIRestMethod -Url $urlUpdateParams -Method Post -Body $body -ContentType $content




6 REPLIES 6
Anonymous
Not applicable

Hi @roncruiser ,
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

Anonymous
Not applicable

Hi @roncruiser ,
we haven't heard back from you regarding our last response and wanted to check if your issue has been resolved.
If our response addressed your query, please mark it as Accept Answer and click Yes if you found it helpful.
If you have any further questions, feel free to reach out.
Thank you for being a part of the Microsoft Fabric Community Forum!

Anonymous
Not applicable

Hi @roncruiser ,
Thank you @Deku  for the prompt response!

May I ask if you have gotten this issue resolved?
If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.
Thank you.

Deku
Super User
Super User

URL should look like this

 

https://api.powerbi.com/v1.0/myorg/datasets/{datasetId}/Default.UpdateParameters

 

Docs here 


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Thanks! I ran the scripit with the changes in the URL.

The errors suggest there is an issue with the last line of the script.
Two errors: One with AggregateException and the other with Exception.
Anyone know what could be the issue?  -Seeking help
Thanks -

Invoke-PowerBIRestMethod -Url $urlUpdateParams -Method Post -Body $body -ContentType $content

 

roncruiser_1-1742603009934.png

 

Update body like this

 

1000016262.jpg

 

Please see this guyinacube video


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.