How to restore Power BI Workspace using PowerShell
A week ago, I mistakenly deleted a Power BI workspace that has most of my reports, dashboards and datasets. Today, I am pleased to share with you how it was restored.
For working with workspaces, dashboards, reports, datasets and data sources, you can use the more specialized PowerShell cmdlets Get-PowerBIWorkspace, Get-PowerBIReport, Get-PowerBIDataset. All management cmdlets have an optional parameter called Scope. This parameter can take one of two possible values: Individual and Organization.
This example only work with -Scope Organization and administrator right is required. Also, only new Power BI workspaces (V2) and deleted workspaces that haven’t reached the data retention policy to be completely removed are supported.
To restore old Power BI workspaces (V1): look at the steps in this documentation
Here is how to recover a deleted Workspace (V2):
1. From PowerShell, login to Power BI Service with an Admin account
Login-PowerBI
2. Get the list of all deleted workspaces as a Power BI Admin so you can identify the ids, the id is required to restore the Workspace.
Get-PowerBIWorkspace -scope Organization -Deleted
3. Restore the workspace with a different restore name. For this example, the EMBED workspace was mistakenly deleted, so I am using a different name EMBEDWS to restore it.
Restore-PowerBIWorkspace -Id “ea8ad922-8c17-4ac4-8455-d10c9826a59b”-RestoredName “EMBEDWS” -AdminEmailAddress “PasteyourEmailaddresshere”
Happy Scripting 🙂
One thought on “How to restore Power BI Workspace using PowerShell”
Wow! Thank you so much!
Comments are closed.