Exporting all your Power BI reports at once

A few weeks ago one of my colleagues showed me a PowerShell script to export all Power BI reports from a Power BI Workspace. This could come in handy for back-up purposes (version control is still hard to accomplish) or if you don’t have access to the PBIX files via the normal way and you need to do some edits. The original file can be found here.

I made some changes to the original file to download all reports, from all workspaces and put them in a nice folder structure, with the same names as your workspaces. Of course, it’s still possible to limit the download to only one workspace and one report. Here we go.

With the comments inside the script, I already explain step-by-step how it works. Now I just add some screenshots to show whats happening!

First I’m asked to sign into Power BI
PowerShell replies with my Tenant Information
Continuing with the code

As you can see in the picture above, I decided to download all my reports, from all my workspaces. Some reports aren’t available for download, for example, when incremental refresh is enabled. So far I’ve encountered the following operation failures: Forbidden, BadRequest, NotFound and Unauthorized. The incremental refresh report gave me a BadRequest, and two Usage Metrics report, which I didn’t create, were NotFound. Makes sense, but I’m not sure how they got indexed in the first place. The Unauthorized one is a Microsoft 365 Usage Analytics report. That's an app from AppSource and while writing this article, you aren’t able to download these pbix files. Now the Forbidden one. I’ts a copy of an incremental refresh dataset, and has no data inside. I’m not completely sure how I got it there in the first place. But that there is something wrong with it, that's for sure ;).

Here you can see the results of the final step of the script:

Downloading notification in PowerShell

And here is my folder structure. As you can see I ran it on the 29th of January and the first of February:

Folder structure in Explorer

I really hope this script will come in handy for those who need it! With the different options to download All reports, from all workspaces or all reports in one workspace or one report in one workspace, you have a lot of freedom to adjust it to your needs!

Take care.

--

--

--

Enthousiastic Power BI'er

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Amazon Connect Serverless Historical Analytics Solution

Meet the Experts: Carlos Mostek

Basic Script to ease your postman testing experience

How to use Microsoft Word to write a REAME.md file for your GitHub project

Using the new Power BI Field Parameter to give your end-users more flexibility

추가 compose file : 설정

Installing NATS on IBM Cloud

What to do when stuck bug hunting

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Erik Hamoen

Erik Hamoen

Enthousiastic Power BI'er

More from Medium

5 Kusto Queries for Azure Log Analytics with AAS/Gen2

Using SQL to Organize Spreadsheet for JotForm Autofill documents

Facts of Dataflows in PowerBI

Getting data from the previous row in your table visual in Power BI