Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
Hi all,
i've this issue:
i need to get the data (or graph) contained in a PowerBi dashboard.
The pbix. report is published directly in PowerBi Report Server (i don't use Microsoft cloud).
Is it possible to get data or graph using powershell?
Thanks in advance,
Daniele
Hi @DaniEMIT ,
Reports sent to the pull server are entered into a database on the server. The reports are available through calls to the web service. To retrieve reports for a specific node, send an HTTP request to the report web service in the following form:
http://CONTOSO-REPORT:8080/PSDSCReportServer.svc/Nodes(AgentId='MyNodeAgentId')/Reports
Where MyNodeAgentId is the AgentId of the node for which you want to get reports. You can get the AgentID for a node by calling Get-DscLocalConfigurationManager on that node.
The reports are returned as an array of JSON objects.
The following script returns the reports for the node on which it is run:
function GetReport
{
param
(
$AgentId = "$((glcm).AgentId)",
$serviceURL = "http://CONTOSO-REPORT:8080/PSDSCPullServer.svc"
)
$requestUri = "$serviceURL/Nodes(AgentId= '$AgentId')/Reports"
$request = Invoke-WebRequest -Uri $requestUri -ContentType "application/json;odata=minimalmetadata;streaming=true;charset=utf-8" `
-UseBasicParsing -Headers @{Accept = "application/json";ProtocolVersion = "2.0"} `
-ErrorAction SilentlyContinue -ErrorVariable ev
$object = ConvertFrom-Json $request.content
return $object.value
}
refer:
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi Lucien,
first of all thanks for you reply.
With the powershell i 2 problem:
1) i can't recover the "AgentId" and i haven't (or i don't know how to reach it) the PSDSCPULLServer;
2) with this powershell i can't get graph directly from the report.
Can you help me in these issue?
Thanks,
Daniele
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 1 |
| User | Count |
|---|---|
| 10 | |
| 5 | |
| 5 | |
| 5 | |
| 4 |