<?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: Reporting Services PowerShell: Setting DataSource of a PowerbiReport in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Reporting-Services-PowerShell-Setting-DataSource-of-a/m-p/1026427#M13865</link>
    <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i got a solution now. You need to access the Portal instead of the server:&lt;/P&gt;&lt;PRE&gt;$ReportServerUri = "http://&amp;lt;&amp;lt;ServerName&amp;gt;&amp;gt;/PBIReportServer"
$ReportPortalUri = "http://&amp;lt;&amp;lt;ServerName&amp;gt;&amp;gt;/PBIReports"&lt;BR /&gt;Get-RsRestItemDataSource -RsItem $dataSourcePath -ReportPortalUri $ReportPortalUri&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;no I can access via:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;foreach ($dataSource in $ds) {
$dataSource.DataModelDataSource.Username = "TestAPI"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and set it via:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Set-RsRestItemDataSource -RsItem $dataSourcePath -DataSource $ds -RsItemType PowerBIReport -ReportPortalUri $ReportPortalUri&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps someone else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
    <pubDate>Wed, 15 Apr 2020 06:47:49 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-04-15T06:47:49Z</dc:date>
    <item>
      <title>Reporting Services PowerShell: Setting DataSource of a PowerbiReport</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Reporting-Services-PowerShell-Setting-DataSource-of-a/m-p/1026365#M13864</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to set the User and the Password of a Powerbi Dashboard via the PowerShell Reporting Services:&lt;/P&gt;&lt;P&gt;&lt;A href="https://github.com/microsoft/ReportingServicesTools" target="_blank" rel="noopener"&gt;https://github.com/microsoft/ReportingServicesTools&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;If I am trying to get the DataSource of a PBIX Report, the count is 0.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ds = Get-RsItemDataSource -proxy $Proxy -RsItem $dataSourcePath&lt;BR /&gt;$ds.Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;or&amp;nbsp; (from &lt;A href="https://github.com/microsoft/ReportingServicesTools/blob/master/Tests/CatalogItems/Set-RsItemDataSource.Tests.ps1" target="_blank" rel="noopener"&gt;https://github.com/microsoft/ReportingServicesTools/blob/master/Tests/CatalogItems/Set-RsItemDataSource.Tests.ps1&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;$ds = Get-RsItemDataSource -Path $dataSourcePath -Proxy $proxy&lt;BR /&gt;$ds.Count&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I Change the ReportPath to something that does not exist, the whole script fails, so the Path should be correct.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What am I doing wrong?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks and Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 06:24:20 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Reporting-Services-PowerShell-Setting-DataSource-of-a/m-p/1026365#M13864</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-15T06:24:20Z</dc:date>
    </item>
    <item>
      <title>Re: Reporting Services PowerShell: Setting DataSource of a PowerbiReport</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Reporting-Services-PowerShell-Setting-DataSource-of-a/m-p/1026427#M13865</link>
      <description>&lt;P&gt;HI,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i got a solution now. You need to access the Portal instead of the server:&lt;/P&gt;&lt;PRE&gt;$ReportServerUri = "http://&amp;lt;&amp;lt;ServerName&amp;gt;&amp;gt;/PBIReportServer"
$ReportPortalUri = "http://&amp;lt;&amp;lt;ServerName&amp;gt;&amp;gt;/PBIReports"&lt;BR /&gt;Get-RsRestItemDataSource -RsItem $dataSourcePath -ReportPortalUri $ReportPortalUri&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;no I can access via:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;foreach ($dataSource in $ds) {
$dataSource.DataModelDataSource.Username = "TestAPI"
}&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and set it via:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Set-RsRestItemDataSource -RsItem $dataSourcePath -DataSource $ds -RsItemType PowerBIReport -ReportPortalUri $ReportPortalUri&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this helps someone else.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2020 06:47:49 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Reporting-Services-PowerShell-Setting-DataSource-of-a/m-p/1026427#M13865</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-04-15T06:47:49Z</dc:date>
    </item>
  </channel>
</rss>

