Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zachrenwick/2cb5975d5dfce7ac2c9794575b631817 to your computer and use it in GitHub Desktop.
Save zachrenwick/2cb5975d5dfce7ac2c9794575b631817 to your computer and use it in GitHub Desktop.
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