{"id":1141,"date":"2022-03-06T17:53:20","date_gmt":"2022-03-06T15:53:20","guid":{"rendered":"https:\/\/www.flip-design.de\/?p=1141"},"modified":"2022-03-06T17:53:20","modified_gmt":"2022-03-06T15:53:20","slug":"how-to-check-if-a-power-bi-report-contains-custom-visuals","status":"publish","type":"post","link":"https:\/\/www.flip-design.de\/?p=1141","title":{"rendered":"How to check if a Power BI report contains Custom Visuals"},"content":{"rendered":"\n<p>If you want to disable the usage of Custom Visuals inside your Power BI tenant, it is good when you know which visuals already used by your users. To determine the used visuals, you can use PowerShell to download, extract and search for custom visuals inside the published reports. The script below, are simple and must fit to your environment and use a loop over your workspaces and reports.<\/p>\n\n\n\n<p>I have created a Power BI report, imported some custom visuals, and published it to my service.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Login-PowerBI\r\n\r\n$reportId = \"adf437ba-63ea-47f0-8279-79c893628f9b\"\r\n$workspaceId = \"dba4761e-abb5-4323-9620-44739e292f9e\"\r\n$exportFolder = \"c:\\temp\"\r\n\r\nExport-PowerBIReport -WorkspaceId $workspaceId -id $reportId -OutFile $exportFolder\"\\\"$reportId\".zip\"\r\nExpand-Archive $exportFolder\"\\\"$reportId\".zip\" -DestinationPath $exportFolder\"\\\"$reportId \r\n\r\n$customVisuals = get-childitem $exportFolder\"\\\"$reportId\"\\Report\\CustomVisuals\"\r\n$customVisuals.PSChildName\r\n\r\nremove-item $exportFolder\"\\\"$reportId\".zip\" -Force\r\nremove-item $exportFolder\"\\\"$reportId -Force -Recurse<\/code><\/pre>\n\n\n\n<p>The script downloads the report, extract the content, and lists the custom visuals which are in use:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/03\/image.png\"><img decoding=\"async\" loading=\"lazy\" width=\"945\" height=\"555\" src=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/03\/image.png\" alt=\"\" class=\"wp-image-1142\" srcset=\"https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/03\/image.png 945w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/03\/image-300x176.png 300w, https:\/\/www.flip-design.de\/wp-content\/uploads\/2022\/03\/image-768x451.png 768w\" sizes=\"(max-width: 945px) 100vw, 945px\" \/><\/a><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>If you want to disable the usage of Custom Visuals inside your Power BI tenant, it is good when you know which visuals already used by your users. To determine the used visuals, you can use PowerShell to download, extract &hellip; <a href=\"https:\/\/www.flip-design.de\/?p=1141\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1141"}],"collection":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1141"}],"version-history":[{"count":1,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1141\/revisions"}],"predecessor-version":[{"id":1143,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=\/wp\/v2\/posts\/1141\/revisions\/1143"}],"wp:attachment":[{"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1141"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1141"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.flip-design.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1141"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}