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 am hitting an error when I try to scan through all the workspace in my organization stored in a text file and retrieve all the power bi reports using the power shell command. Even I don't export to a text file, it runs for a while and then throws the same error.
I read in another thread it could be due to the tenant being busy. I tried executing this command at different times periods and it always results in an error. Is there any way to fix it?
Basically, I need to extract all the workspaces and artifacts under it in an excel or CSV format. So I extract a workspace id first and then copied to a text file and scan through it to get the report details.
foreach($line in Get-Content "C:\Mohan\PBIDetails\WorkspaceId.txt") {
if($line -match $regex){
#write-host $line
Get-PowerBIReport -Scope Organization -WorkspaceId $line | Export-Csv -NoTypeInformation –Path 'C:\Mohan\PBIDetails\pbreportws1.csv'
}
}
The input file has list of workspace id's which i have extracted using another script. Its just a single line of workspace id's.
Hi @Anonymous ,
I created a similar script but I did not reproduce your problem.
Try to run this command directly and set the value of the parameter ‘-Worksapce’ to a fixed value. If there is no error, then there is a problem with your other code.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Ask your tenant admin to run the inventory for you. Much simpler that way.
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.