<?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 Re: What is the complete output of Get-PowerBIDatasource in Powershell? in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119229#M54983</link>
    <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;I wish. A very tightly controlled SPA. Even purview is blocked by our internal firewall even though it's Microsoft. Out of my control. Lol.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2024 18:42:11 GMT</pubDate>
    <dc:creator>pborah</dc:creator>
    <dc:date>2024-08-26T18:42:11Z</dc:date>
    <item>
      <title>What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4102972#M54785</link>
      <description>&lt;P&gt;Context- I'm a workspace admin and I want to programtically export an inventory of all the datasources used in our tenant. I'm trying to create a script that will loop through each workspace, get the datasets in there, and get the datasources for each of those datasets. 99% of our reports are powered by SQL and my script is only concerned with those reports.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm almost there but I'm stuck at the last part where I want to retrive the SQL tables and views besides server and database names. I've gone through the documentations and can't seem to find anything on what Get-PowerBIDatasource actually outputs. With some research, I was able to determine that some of the outputs are - ConnectionDetails.Server, ConnectionDetails.Database, etc. Does the output hashtable contain table/view information as well?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In the service I know that lineage view or even gateways do not have that info either and just contain connection string upto database. So am I right in assuming that getting to the root will involve looking into the report (definition) itself somehow? Or is it because I am not a gateway admin, I can't see tables and views for any of those parent nodes in lineage?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'd also appreciate it if you can point me to some further documentations specific to the output of Get-PowerBIDatasource connection details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 19:58:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4102972#M54785</guid>
      <dc:creator>pborah</dc:creator>
      <dc:date>2024-08-15T19:58:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4103020#M54788</link>
      <description>&lt;P&gt;You need to run DMV queries for that, against expressions and partitions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;I'm a workspace admin and I want to programtically export an inventory of all the datasources used in our tenant&lt;/LI-CODE&gt;
&lt;P&gt;You need to be tenant admin to see all workspaces and their semantic models and their data sources.&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2024 20:47:35 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4103020#M54788</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-15T20:47:35Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4104293#M54805</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;Are you talking about the final bit to retrieve table and view information? Because I can most certainly get all info upto database level for every workspace in our tenant. The workspace admin AD group is added to every single workspace in our tenant as organizational policy. You may be correct in situations when a workspace admin isn't added to every workspace in tenant (which wouldn't make sense) but such is not the case for us. Below is my code and it returns everything upto server and database flawlessly-&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Connect-PowerBIServiceAccount

#Get all test workspaces
$workspaces = Get-PowerBIWorkspace -Filter "contains(tolower(name),'test')"

#loop through contents to get SQL sources

foreach ($workspace in $workspaces) {
    $datasets= Get-PowerBIDataset -WorkspaceId $workspace.Id

    foreach($dataset in $datasets) {
        $datasources = Get-PowerBIDatasource -DatasetId $dataset.ID

        foreach ($datasource in $datasources) {
            $output = "Workspace: " + $workspace.Name + "`tSemanticModel: " + $dataset.Name + "`tServer: " + $datasource.ConnectionDetails.Server + "`tDatabase: " + $datasource.ConnectionDetails.Database + "`n"
            Write-Output $output

            #time delay
            Start-Sleep -Seconds 2
        }
    }
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 13:32:55 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4104293#M54805</guid>
      <dc:creator>pborah</dc:creator>
      <dc:date>2024-08-16T13:32:55Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4104297#M54806</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;The workspace admin AD group is added to every single workspace in our tenant as organizational policy.&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ouch.&amp;nbsp; then yes - your access level should be sufficient. just run the DMVs against each of the workspace's semantic models.&lt;/P&gt;</description>
      <pubDate>Fri, 16 Aug 2024 13:51:44 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4104297#M54806</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-16T13:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4104328#M54810</link>
      <description>&lt;P&gt;Thank you, I'll give it a look. And I know. In an ideal world, I'd be a PowerBI admin at minimum with more access and authority. We're exploring a service principal account to be able to do this type of thing. We'll see where it lands.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 17:46:29 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4104328#M54810</guid>
      <dc:creator>pborah</dc:creator>
      <dc:date>2024-08-26T17:46:29Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4106205#M54837</link>
      <description>&lt;P style="margin-top: 0pt; margin-bottom: 8pt; font-family: Arial; font-size: 12.0pt;"&gt;Hi,&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240749" data-lia-user-login="pborah" class="lia-mention lia-mention-user"&gt;pborah&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Can you tell me if your problem is solved? If yes, please accept&amp;nbsp;&lt;SPAN&gt;lbendlin&lt;/SPAN&gt;&lt;SPAN&gt;'s reply&amp;nbsp;&lt;/SPAN&gt;as solution.&lt;/P&gt;
&lt;P style="margin-top: 0pt; margin-bottom: 8pt; font-family: Arial; font-size: 12.0pt;"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin-top: 0pt; margin-bottom: 8pt; font-family: Arial; font-size: 12.0pt;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin-top: 0pt; margin-bottom: 8pt; font-family: Arial; font-size: 12.0pt;"&gt;Leroy Lu&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 05:46:12 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4106205#M54837</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-19T05:46:12Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4106968#M54841</link>
      <description>&lt;P&gt;hi&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;not yet. Will post a reply if successful. Thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Aug 2024 13:22:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4106968#M54841</guid>
      <dc:creator>pborah</dc:creator>
      <dc:date>2024-08-19T13:22:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4108117#M54855</link>
      <description>&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Hi,&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="240749" data-lia-user-login="pborah" class="lia-mention lia-mention-user"&gt;pborah&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Thanks for the quick reply.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;Looking forward to your latest reply.&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;" lang="zh-CN"&gt;I wish you all the best in your life.&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN&gt;Of course, if you have any new ideas, you are welcome to contact us.&lt;BR /&gt;&lt;/SPAN&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Best Regards,&lt;/P&gt;
&lt;P style="margin: 0in; font-family: Arial; font-size: 12.0pt; color: black;"&gt;Leroy Lu&lt;/P&gt;</description>
      <pubDate>Tue, 20 Aug 2024 03:03:57 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4108117#M54855</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-08-20T03:03:57Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119176#M54979</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;Anonymous&lt;/a&gt;&amp;nbsp;I've been instructed to abandon the DMV query route because something else is in the works on the side of our infrastructure team. Regardless I trust your expertise in that this is the way to pry open a data model and look inside it as I did my own research. So I'm accepting this as a solution.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 17:45:14 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119176#M54979</guid>
      <dc:creator>pborah</dc:creator>
      <dc:date>2024-08-26T17:45:14Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119182#M54980</link>
      <description>&lt;P&gt;What do they have "in the works"? Scanner API? Purview?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 17:50:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119182#M54980</guid>
      <dc:creator>lbendlin</dc:creator>
      <dc:date>2024-08-26T17:50:11Z</dc:date>
    </item>
    <item>
      <title>Re: What is the complete output of Get-PowerBIDatasource in Powershell?</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119229#M54983</link>
      <description>&lt;P&gt;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="100342" data-lia-user-login="lbendlin" class="lia-mention lia-mention-user"&gt;lbendlin&lt;/a&gt;&amp;nbsp;I wish. A very tightly controlled SPA. Even purview is blocked by our internal firewall even though it's Microsoft. Out of my control. Lol.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 18:42:11 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/What-is-the-complete-output-of-Get-PowerBIDatasource-in/m-p/4119229#M54983</guid>
      <dc:creator>pborah</dc:creator>
      <dc:date>2024-08-26T18:42:11Z</dc:date>
    </item>
  </channel>
</rss>

