Forum Discussion
How can i get the SharePoint or File locations of a DataSource using PowerShell
hello all
I am trying to find out the location of a Datasource SharePoint or File.
when i run the PowerBIDatasource PowerShell cmdlet it does not return that detail
thanks in advance
Hi Anonymous ,
You need to invoke the rest API.
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasourcesingroup
Please try:
Invoke-PowerBIRestMethod -Url 'groups/xxxxxxxxxxx/datasets/xxxxxxxxxx/datasources' -Method GetBest Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
2 Replies
- lbendlin
Super User
You need to run DMV queries against the XMLA endpoint to get that information
select * from $SYSTEM.TMSCHEMA_PARTITIONS
- V-lianl-msft
Community Support
Hi Anonymous ,
You need to invoke the rest API.
https://docs.microsoft.com/en-us/rest/api/power-bi/datasets/getdatasourcesingroup
Please try:
Invoke-PowerBIRestMethod -Url 'groups/xxxxxxxxxxx/datasets/xxxxxxxxxx/datasources' -Method GetBest Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.