Installation Guide

Backing Up Custom Reports

There are known issues in the Power BI service that will cause in-place upgrades to fail resulting in loss of all custom reports. Always follow this backup procedure prior to performing an upgrade. One issue that we know will cause the upgrade to fail is if any dashboards exist in the workspace. Please do not confuse dashboards with reports. If you've not created a Power BI dashboard this not applicable to you. If you do use dashboards please contact us for assistance with the upgrade. Microsoft have committed to resolving this issue however, this is not the first issue that we've seen that caused upgrade failures. In light of this issue we recommend that all customers perform a backup of all custom reports prior to attempting upgrades.


To begin the backup process visit App Source and perform a new clean install of BI for SCCM. Next, run the following PowerShell script and follow the screenshots below. You will be copying all of your custom reports from your current production workspace to the new clean installation. Afterwards, perform the upgrade of your current product workspace. If all goes well there's no more action required. In the event of a failed upgrade you will have to share the newly installed workspace containing the backup of your custom reports. If you have any questions or concerns please contact us prior to performing the upgrade.

####UNCOMMENT NEXT LINE THE FIRST TIME YOU USE THIS SCRIPT!####

## Install-Module -Name MicrosoftPowerBIMgmt

## Connect to the PowerBi Service

Connect-PowerBIServiceAccount

#Find the Workspaces

## Change "SCCM" to "Intune" to find Intune Workspaces ##

$AllWorkspaces = Get-PowerBIWorkspace ### FILTER TO SHOW ONLY BI FOR SCCM Workspaces REMOVE TO SHOW OTHERS ##### | Where-Object {$_.Name -like "*SCCM*"}

## Select the source workspace

## Change "SCCM" to "Intune" to find Intune Workspaces ##

$SourceWorkspace = $AllWorkspaces | Out-GridView -Title 'Choose a source workspace' -PassThru

## Select the destination workspace

## Change "SCCM" to "Intune" to find Intune Workspaces ##

$DestinationWorkspace = $AllWorkspaces | Out-GridView -Title 'Choose a destination workspace' -PassThru

## Find the custom reports in the source workspace

## Change "SCCM" to "Intune" to find Intune Workspaces ##

$SourceReports = Get-PowerBIReport -WorkspaceId $SourceWorkspace.Id | Where-Object {$_.Name -ne "bi_for_sccm"}

### $SourceReports = $SourceReports | Select -Unique

### Get the destination workspace datasetID

$DestinationDataset = Get-PowerBIReport -WorkspaceId $DestinationWorkspace.ID

## Copy the source reports to the destination workspace using the destination dataset

$SourceReportsUniqueID =@()

Foreach ($Report in $SourceReports)

{

$ReportID = $Report.Id

$Name = $Report.Name

if(-Not($ReportID -in $SourceReportsUniqueID)){

$SourceReportsUniqueID += @($ReportID)

Write-host "About to copy" $Name "from report ID" $ReportID "and Workspace ID" $SourceWorkspace.Id "to target workspace ID" $DestinationWorkspace.Id "using target destination ID" $DestinationDataset.DatasetID

Copy-PowerBIReport -Name $Name -Id $ReportID -WorkspaceId $SourceWorkspace.Id -TargetWorkspaceId $DestinationWorkspace.Id -TargetDatasetId $DestinationDataset.DatasetID}}

Next perform a normal in-place upgrade as described in the Performing an In-place Upgrade documentation.