<?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 Using Powershell and ReportService2010.asmx to get datasource details how to find ds path in Report Server</title>
    <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Powershell-and-ReportService2010-asmx-to-get-datasource/m-p/3658354#M32569</link>
    <description>&lt;P&gt;I am using powershell and the&amp;nbsp;ReportService2010.asmx endpoint to retrieve list of SSRS Reports and their dataSources from PBI Reportserver.&amp;nbsp; For background, I am calling &lt;A href="https://sqljana.wordpress.com/2017/04/25/powershell-working-with-sql-server-reporting-services-ssrs-getset-data-sources-deploy-reports/" target="_self"&gt;these functions&lt;/A&gt; created by&amp;nbsp;&amp;nbsp;written by&amp;nbsp;&lt;SPAN&gt;Jana Sattainathan. ( I am rather new to powershell)&lt;BR /&gt;I am able to pull reports, and for each report I can get a datasource REFerence.&amp;nbsp; Bu now I am trying to call&amp;nbsp;GetDataSourceContents so I can get the connectionString and other details.&amp;nbsp; From the datasource object I have access to datasource reference and name,&amp;nbsp; report path and name , But I think I need the path to the datasource itself. (Code below )&lt;BR /&gt;Can anyone help me figure out how to construct this value?&amp;nbsp; OR,&amp;nbsp; The GetDataSourceContents I am callin may not be the correct one?&amp;nbsp; It does not show up in my "commands" window in the ISE , but it pops up when putting a . after the&amp;nbsp;$reportproxy I am using which is&amp;nbsp;&lt;A href="https://MyServer.com/ReportServer/ReportService2010.asmx" target="_blank"&gt;https://MyServer.com/ReportServer/ReportService2010.asmx&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$Reports = Get-SSRSReport -ReportServerUri $PBIRSReportServerUri -ReportFolderPath $StartFolder

foreach ($Report in $Reports){
    Write-Host $Report.Name $Report.Path $Report.TypeName 

    $DSS = Get-SSRSReportDataSource  -ReportServerUri $PBIRSReportServerUri -ReportFolderPath "/AP Administrators"  

    foreach ($DS in $DSS){
        Write-Host   $DS.ReportName $DS.ReportPath $DS.DataSourceName $DS.ReportPath  $DS.ReportName
        $validObject = $reportproxy.GetDataSourceContents($DS.ReportPath) &amp;lt;---What should this value be?
        Write-Host $validObject.ConnectString  -ForegroundColor Cyan
    } 
}&lt;/LI-CODE&gt;&lt;P&gt;Error Message:&amp;nbsp;&lt;FONT color="#FF0000"&gt;Exception calling "GetDataSourceContents" with "1" argument(s): "The operation you are attempting on item '/AP Administrators/Server Administration/SQL Datafeed History' is not allowed for this item type&lt;BR /&gt;&lt;FONT color="#000000"&gt;Here is a sample url to a datasource on the server , but I don't think it helps&lt;BR /&gt;&lt;A href="https://MyServer/Reports/manage/catalogitem/datasources/AP" target="_blank"&gt;https://MyServer/Reports/manage/catalogitem/datasources/&lt;/A&gt;folder/subfolder/reportname?_pk=sdp2ph00&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jan 2024 00:43:02 GMT</pubDate>
    <dc:creator>DataRower</dc:creator>
    <dc:date>2024-01-25T00:43:02Z</dc:date>
    <item>
      <title>Using Powershell and ReportService2010.asmx to get datasource details how to find ds path</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Powershell-and-ReportService2010-asmx-to-get-datasource/m-p/3658354#M32569</link>
      <description>&lt;P&gt;I am using powershell and the&amp;nbsp;ReportService2010.asmx endpoint to retrieve list of SSRS Reports and their dataSources from PBI Reportserver.&amp;nbsp; For background, I am calling &lt;A href="https://sqljana.wordpress.com/2017/04/25/powershell-working-with-sql-server-reporting-services-ssrs-getset-data-sources-deploy-reports/" target="_self"&gt;these functions&lt;/A&gt; created by&amp;nbsp;&amp;nbsp;written by&amp;nbsp;&lt;SPAN&gt;Jana Sattainathan. ( I am rather new to powershell)&lt;BR /&gt;I am able to pull reports, and for each report I can get a datasource REFerence.&amp;nbsp; Bu now I am trying to call&amp;nbsp;GetDataSourceContents so I can get the connectionString and other details.&amp;nbsp; From the datasource object I have access to datasource reference and name,&amp;nbsp; report path and name , But I think I need the path to the datasource itself. (Code below )&lt;BR /&gt;Can anyone help me figure out how to construct this value?&amp;nbsp; OR,&amp;nbsp; The GetDataSourceContents I am callin may not be the correct one?&amp;nbsp; It does not show up in my "commands" window in the ISE , but it pops up when putting a . after the&amp;nbsp;$reportproxy I am using which is&amp;nbsp;&lt;A href="https://MyServer.com/ReportServer/ReportService2010.asmx" target="_blank"&gt;https://MyServer.com/ReportServer/ReportService2010.asmx&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;$Reports = Get-SSRSReport -ReportServerUri $PBIRSReportServerUri -ReportFolderPath $StartFolder

foreach ($Report in $Reports){
    Write-Host $Report.Name $Report.Path $Report.TypeName 

    $DSS = Get-SSRSReportDataSource  -ReportServerUri $PBIRSReportServerUri -ReportFolderPath "/AP Administrators"  

    foreach ($DS in $DSS){
        Write-Host   $DS.ReportName $DS.ReportPath $DS.DataSourceName $DS.ReportPath  $DS.ReportName
        $validObject = $reportproxy.GetDataSourceContents($DS.ReportPath) &amp;lt;---What should this value be?
        Write-Host $validObject.ConnectString  -ForegroundColor Cyan
    } 
}&lt;/LI-CODE&gt;&lt;P&gt;Error Message:&amp;nbsp;&lt;FONT color="#FF0000"&gt;Exception calling "GetDataSourceContents" with "1" argument(s): "The operation you are attempting on item '/AP Administrators/Server Administration/SQL Datafeed History' is not allowed for this item type&lt;BR /&gt;&lt;FONT color="#000000"&gt;Here is a sample url to a datasource on the server , but I don't think it helps&lt;BR /&gt;&lt;A href="https://MyServer/Reports/manage/catalogitem/datasources/AP" target="_blank"&gt;https://MyServer/Reports/manage/catalogitem/datasources/&lt;/A&gt;folder/subfolder/reportname?_pk=sdp2ph00&lt;/FONT&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jan 2024 00:43:02 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Powershell-and-ReportService2010-asmx-to-get-datasource/m-p/3658354#M32569</guid>
      <dc:creator>DataRower</dc:creator>
      <dc:date>2024-01-25T00:43:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using Powershell and ReportService2010.asmx to get datasource details how to find ds path</title>
      <link>https://community.fabric.microsoft.com/t5/Report-Server/Using-Powershell-and-ReportService2010-asmx-to-get-datasource/m-p/3662272#M32593</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="679914" data-lia-user-login="DataRower" class="lia-mention lia-mention-user"&gt;DataRower&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;Please refer below url, hope it is helpful for you.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://stackoverflow.com/questions/48508803/return-all-ssrs-reports-in-a-folder-with-the-data-source-name-and-connectstring" target="_blank"&gt;powershell - Return all SSRS reports in a folder with the data source name and ConnectString - Stack Overflow&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Best regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Community Support Team_Binbin Yu&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If this post&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;&lt;I&gt;helps&lt;/I&gt;&lt;/STRONG&gt;&lt;SPAN&gt;, then please consider&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;to help the other members find it more quickly.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 26 Jan 2024 08:34:36 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Report-Server/Using-Powershell-and-ReportService2010-asmx-to-get-datasource/m-p/3662272#M32593</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-01-26T08:34:36Z</dc:date>
    </item>
  </channel>
</rss>

