Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Jumpgate935
Frequent Visitor

PowerShell scripting to tell difference between RDL and PBIX in Power BI service

I have a PowerShell script using the Get-PowerBIWorkspace, Get-PowerBIReport, and Export-PowerBIReport cmdlets to retrieve the report files from our Power BI service workspaces.   We recently went to premium capacity, and now we have pagianted report content some of our workspaces.  In our case, the RDL and PBIX files in the workspace are named with the same name.

 

My current export script is finding the two items named the same (one paginated report and the other a Power BI report), but it doesn't handle identification of the file I am looking at as RDL or PBIX content.  (My script to this point has assumed that it would only see PBIX files and writes the files out with that extension.)   The effect of my script exporting the workspace is that the first extraction is overwritten by the second, since I am just reading out the exported file contents and appending the PBIX file extension to it.  

 

I didn't see anyway in the return data from the PowerShell cmdlets I'm using to determine what kind of report content I am accessing - RDL or PBIX.  Is there a type value or some value I can evaluate to filter my powershell command to find only the RDL content? 

 

2 REPLIES 2
Jumpgate935
Frequent Visitor

Thank you for your input - I've added a Power BI Idea for that enhancement here: Microsoft Idea · Extend the PowerShell scripts Get-PowerBIReport and Export-PowerBIReport to identif... . Vote it up!

 

So given that I can't identify the file with an attribute in those PowerShell scripts, does anyone have a tidy way in PowerShell to examine the file I've downloaded to deternine if it is a PBIX or RDL file?  I'm assuming the content of the files would tell me if I knew what I was looking for in them and the best way to script that examination.

 

Anonymous
Not applicable

Hi @Jumpgate935 ,

According to the syntax of cmdlets Get-PowerBIReport, I did not find any parameter to identify the report type. Please check this documentation for details. You can raise a new idea and add your comments there to make this feature coming sooner. 

Get-PowerBIReport
   [-Scope <PowerBIUserScope>]
   [-Filter <String>]
   [-First <Int32>]
   [-Skip <Int32>]
   [-WorkspaceId <Guid>]
   [<CommonParameters>]

Best Regards

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.