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
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
v-pagayam-msft
Community Support
Community Support

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!

v-pagayam-msft
Community Support
Community Support

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!

v-pagayam-msft
Community Support
Community Support

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
Community Champion
Community Champion

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

 

Deku
Community Champion
Community Champion

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
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.