Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Power BI Powershell Command to Copy Report and Rebind to New Dataset
# Update nuget
Install-PackageProvider -Name NuGet -Force
# Install power bi cmdlts if not already installed (may take a little bit of time)
Install-Module -Name MicrosoftPowerBIMgmt -Force
# Connect to service
Connect-PowerBIServiceAccount
#Make a copy of DEV report but rebind it to Prod dataset
#Docs here: https://docs.microsoft.com/en-us/powershell/module/microsoftpowerbimgmt.reports/copy-powerbireport?view=powerbi-ps
Copy-PowerBIReport `
-Name "00000000-0000-0000-0000-000000000000" `
-Id "00000000-0000-0000-0000-000000000000" `
-WorkspaceId "00000000-0000-0000-0000-000000000000" `
-TargetWorkspaceId "00000000-0000-0000-0000-000000000000" `
-TargetDatasetId "00000000-0000-0000-0000-000000000000"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment