<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Power Shell command to extract Power BI Reports from Workspace. in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1758488#M28728</link>
    <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hitting an error when I try to scan through all the workspace in my organization stored in a text file and retrieve all the power bi reports using the power shell command.&amp;nbsp; Even I don't export to a text file, it runs for a while and then throws the same error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read in another thread it could be due to the tenant being busy.&amp;nbsp; I tried executing this command at different times periods and it always results in an error.&amp;nbsp; Is there any way to fix it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I need to extract all the workspaces and artifacts under it in an excel or CSV format.&amp;nbsp; &amp;nbsp;So I extract a workspace id first and then copied to a text file and scan through it to get the report details.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach($line in Get-Content "C:\Mohan\PBIDetails\WorkspaceId.txt") {&lt;BR /&gt;if($line -match $regex){&lt;BR /&gt;#write-host $line&lt;BR /&gt;Get-PowerBIReport -Scope Organization -WorkspaceId $line | Export-Csv -NoTypeInformation –Path 'C:\Mohan\PBIDetails\pbreportws1.csv'&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The input file has list of workspace id's which i have extracted using another script.&amp;nbsp; Its just a single line of workspace id's.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 31 Mar 2021 23:23:26 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2021-03-31T23:23:26Z</dc:date>
    <item>
      <title>Power Shell command to extract Power BI Reports from Workspace.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1758488#M28728</link>
      <description>&lt;P&gt;Hi All,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am hitting an error when I try to scan through all the workspace in my organization stored in a text file and retrieve all the power bi reports using the power shell command.&amp;nbsp; Even I don't export to a text file, it runs for a while and then throws the same error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I read in another thread it could be due to the tenant being busy.&amp;nbsp; I tried executing this command at different times periods and it always results in an error.&amp;nbsp; Is there any way to fix it?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Basically, I need to extract all the workspaces and artifacts under it in an excel or CSV format.&amp;nbsp; &amp;nbsp;So I extract a workspace id first and then copied to a text file and scan through it to get the report details.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;foreach($line in Get-Content "C:\Mohan\PBIDetails\WorkspaceId.txt") {&lt;BR /&gt;if($line -match $regex){&lt;BR /&gt;#write-host $line&lt;BR /&gt;Get-PowerBIReport -Scope Organization -WorkspaceId $line | Export-Csv -NoTypeInformation –Path 'C:\Mohan\PBIDetails\pbreportws1.csv'&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The input file has list of workspace id's which i have extracted using another script.&amp;nbsp; Its just a single line of workspace id's.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 31 Mar 2021 23:23:26 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1758488#M28728</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2021-03-31T23:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: Power Shell command to extract Power BI Reports from Workspace.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1762117#M28763</link>
      <description>&lt;P&gt;Ask your tenant admin to run the inventory for you.&amp;nbsp; Much simpler that way.&lt;/P&gt;</description>
      <pubDate>Sat, 03 Apr 2021 00:44:13 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1762117#M28763</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2021-04-03T00:44:13Z</dc:date>
    </item>
    <item>
      <title>Re: Power Shell command to extract Power BI Reports from Workspace.</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1765192#M28800</link>
      <description>&lt;P&gt;Hi&amp;nbsp;Anonymous&lt;/LI-USER&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;I created a similar script but I did not reproduce your problem.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;img /&gt;&lt;/P&gt;
&lt;P&gt;Try to run this command directly and set the value of the parameter ‘-Worksapce’ to a fixed value. If there is no error, then there is a problem with your other code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best regards,&lt;BR /&gt;Lionel Chen&lt;/P&gt;
&lt;P&gt;If this post&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;, then please consider&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;Accept it as the solution&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to help the other members find it more quickly.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 06:21:18 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Power-Shell-command-to-extract-Power-BI-Reports-from-Workspace/m-p/1765192#M28800</guid>
      <dc:creator>v-lionel-msft</dc:creator>
      <dc:date>2021-04-06T06:21:18Z</dc:date>
    </item>
  </channel>
</rss>

