Forum Discussion
Power BI Dataset Description Export
- 3 years ago
To retrieve the description of all the datasets in your Power BI workspace using PowerShell, you can use the Power BI REST API along with the Invoke-RestMethod cmdlet.
Here's an example PowerShell script that demonstrates how to retrieve the dataset names and descriptions:
$workspaceId = "<workspace_id>"
$accessToken = "<access_token>"
$uri = "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/datasets"$datasets = Invoke-RestMethod -Method Get -Uri $uri -Headers @{ Authorization = "Bearer $accessToken" }
foreach ($dataset in $datasets.value) {
Write-Host "Dataset Name: $($dataset.name)"
Write-Host "Dataset Description: $($dataset.description)"
}In this script, you will need to replace <workspace_id> and <access_token> with the ID of your Power BI workspace and a valid access token, respectively.
The script uses the Power BI REST API to retrieve a list of datasets in the specified workspace, and then loops through each dataset to retrieve its name and description. The dataset description is available in the description property of the dataset object.
You can further modify this script to export the dataset names and descriptions to a CSV file or any other desired output format.
To retrieve the description of all the datasets in your Power BI workspace using PowerShell, you can use the Power BI REST API along with the Invoke-RestMethod cmdlet.
Here's an example PowerShell script that demonstrates how to retrieve the dataset names and descriptions:
$workspaceId = "<workspace_id>"
$accessToken = "<access_token>"
$uri = "https://api.powerbi.com/v1.0/myorg/groups/$workspaceId/datasets"
$datasets = Invoke-RestMethod -Method Get -Uri $uri -Headers @{ Authorization = "Bearer $accessToken" }
foreach ($dataset in $datasets.value) {
Write-Host "Dataset Name: $($dataset.name)"
Write-Host "Dataset Description: $($dataset.description)"
}
In this script, you will need to replace <workspace_id> and <access_token> with the ID of your Power BI workspace and a valid access token, respectively.
The script uses the Power BI REST API to retrieve a list of datasets in the specified workspace, and then loops through each dataset to retrieve its name and description. The dataset description is available in the description property of the dataset object.
You can further modify this script to export the dataset names and descriptions to a CSV file or any other desired output format.
Thank you this worked