The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
Hi,
We have as sript which gets reports in workspaces and sometimes runs o.k. but sometimes get task canceled errors - what causes task canceled error and how can we resolve?
Get-PowerBIReport : A task was canceled.
At C:\pbi_pshell\powerbi_tenant.ps1:84 char:26
+ ... $report in (Get-PowerBIReport -Scope Organization -WorkspaceId $works ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : WriteError: (Microsoft.Power...etPowerBIReport:GetPowerBIReport) [Get-PowerBIReport], TaskCanceledException
+ FullyQualifiedErrorId : A task was canceled.,Microsoft.PowerBI.Commands.Reports.GetPowerBIReport
c
part of example code
$logpath = $logbase + "reports.csv"
$Reports =
ForEach ($workspace in $Workspaces)
{
Write-Output "Writing reports...on workspace: " $workspace.Name >> C:\pbi_pshell\powerbi_tenant_log.txt
ForEach ($report in (Get-PowerBIReport -Scope Organization -WorkspaceId $workspace.Id))
{
[pscustomobject]@{
WorkspaceID = $workspace.Id
WorkspaceName = $workspace.Name
ReportID = $report.Id
ReportName = $report.Name
ReportURL = $report.WebUrl
ReportDatasetID = $report.DatasetId
}
}
}
$Reports | Export-Csv -Path $logpath -NoTypeInformation
tenant/capacity running too hot. You got kicked out because other processes needed the memory/renderers.
Thanks for update