Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hi,
Due to now having hundreds of workspaces within my tenant, is it possible to use Powershell (or the likes) to return all datasets for a given on-premise gateway source server name? For example, list all datasets using the gateway server name "AdventureWorks" as it's source?
Thanks.
Yes!
Using the Power BI REST API, you could easily write a script using the following structure and APIs:
Get Groups
For Group in Groups:
Get Datasets In Group
for Dataset in Datasets
Get Datasources In Group
if Datasource contains AdventureWorks do somthing
This of course assumes that you have a user with access to all groups in the organisation.
Let me know if this resolved your issue, or if you need further assistance.
Hi and thanks for your reply.
Do you have any online resources that show me the Powershell code for real world example so I can relate to the actual objects used within the code?
I can return all my gateway sources:
$GatewayClusterDatasources = ForEach ($GWCL in $GatewayClusters)
{
$GWCLID = $GWCL.Id
Get-DataGatewayClusterDatasource -GatewayClusterId $GWCLID -ErrorAction SilentlyContinue |`
Select-Object *,@{Name="DateRetrieved";Expression={$RetrieveDate}}
}
But I can't related the above Id back to any workspace dataset source Id's?
Thanks,
Martin.
Hi @Anonymous
I already tried this functionality and finally i found that there is no such API to query the list of all datasets for a given PowerBI Gateway.
So the direct answer is there is no such functioanlity so far. However you can create your feedback in Ideas.
User | Count |
---|---|
5 | |
5 | |
3 | |
2 | |
2 |
User | Count |
---|---|
9 | |
7 | |
5 | |
4 | |
4 |