Updated CopyWorkspaceSampleScript to work with personal workspaces
This commit is contained in:
Родитель
da30bfbcd8
Коммит
dc4e38c06b
|
@ -137,7 +137,12 @@ Foreach ($report in $reports) {
|
|||
|
||||
Write-Host "== Exporting $report_name with id: $report_id to $temp_path"
|
||||
try {
|
||||
Export-PowerBIReport -Id $report_id -WorkspaceId $source_workspace_ID -OutFile "$temp_path" -ErrorAction Stop
|
||||
if ($source_workspace_ID -eq "me") {
|
||||
Export-PowerBIReport -Id $report_id -OutFile "$temp_path" -ErrorAction Stop
|
||||
}
|
||||
else {
|
||||
Export-PowerBIReport -Id $report_id -WorkspaceId $source_workspace_ID -OutFile "$temp_path" -ErrorAction Stop
|
||||
}
|
||||
}
|
||||
catch {
|
||||
Write-Warning "= This report and dataset cannot be copied, skipping. This is expected for most workspaces."
|
||||
|
|
Загрузка…
Ссылка в новой задаче