Forum Discussion
Deploying master semantic model to multiple (100) workspaces and editing parameter
- Anonymous2 years ago
Thank you Greg_Deckler
Hi, SuperFiets_
We can use PowerShell commands to deploy the semantic model into multiple workspaces, and as you described, after deployment, you need to leverage the PowerAPI to change the parameters.
In the following, I'll walk you through deploying a PBIX file into multiple workspaces:First, we need to follow the PowerShell command of Power BI:
Install-Module -Name MicrosoftPowerBIMgmtUse the following command to deploy your Main Semantic Model into multiple workspaces:
Connect-PowerBIServiceAccount $Path = "C:\Users\xxxx\Desktop\Protest.pbix" $targetWorkspaceIds = ("xxxx-xxx-xxx-xxx","xxxx-xxx-xxx-xxx","xxxx-xxx-xxx-xxx") foreach($targetWorkspaceIds in $targetWorkspaceIds){ New-PowerBIReport -Path $Path -Name "Testaaa" -WorkspaceId $targetWorkspaceIds }The result returned in PowerShell is as follows:
Check if they were deployed successfully in Power BI:
You can learn about these PowerShell commands from the following connection:
New-PowerBIReport (MicrosoftPowerBIMgmt.Reports) | Microsoft Learn
Since you have more than 100 workspaces, you can consider using the following PowerShell command to list all the workspaces, and then collect the workspace IDs that need to be deployed through PowerShell programming, and then use the above command to deploy with one click.
Get-PowerBIWorkspace -AllBest Regards
Jianpeng Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
SuperFiets_ I think that all of those methods would probably work but I think you are probably setting yourself up for a nightmare in terms of maintenance. Have you investigated row level security options? That would allow you to have a single semantic model that supports all of your customers and your customers would only be able to see their data.
Unfortunately RLS isn't what we are looking for, we need datasets completely filtered on a specific client because eventually each dataset will be connected to a set of specific templates. Long story, but this is the reason we are currently looking to get the master dataset deployment working, as to not do updates one by one.
Do you have any experience or tips on how to get any of the methods working? I found a way to clone reports from the master workspace to other workspaces, but unfortunately the dataset won't be cloned..