Supplies are limited. Contact info@espc.tech right away to save your spot before the conference sells out.
Get your discountScore big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount
I would like to retrieve the id of a dataset via this command :
Get-PowerBIDataset -Scope Organization -Name "REPORT FINANCE DEV"
Then, I would like to integrate it in this command instead of the hard number sequence.
$body ='{
"updateDetails": [
{
"name": "WKS_NAME_PARAM",
"newValue": "WKS"
}
]
}'
Invoke-PowerBIRestMethod -Url "https://api.powerbi.com/v1.0/myorg/datasets/ 1cd873be-50b9-4b71-a35f-a58b7dd9f6c2/Default.UpdateParameters" -Method Post -Body $body
Can anyone help me ?
Hi @Anonymous
Use the below script.
$dataset = Get-PowerBIDataset -Scope Organization -Name "SharePoint_Web"
$dataset_id=$dataset.id
$body ='{
"updateDetails": [
{
"name": "WKS_NAME_PARAM",
"newValue": "WKS"
}
]
}'
$url = "https://api.powerbi.com/v1.0/myorg/datasets/ $dataset_id/Default.UpdateParameters"
Invoke-PowerBIRestMethod -Url $url -Method Post -Body $body
Thanks
Hari