<?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 Powershell Script to Update Dataset Not Working in Developer</title>
    <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-Script-to-Update-Dataset-Not-Working/m-p/2693460#M37830</link>
    <description>&lt;P&gt;&lt;SPAN&gt;Hey guys! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I created this script based on some tutorials to update the dataset. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, it works sometimes, not always. Below I will put the script and the error it presents around 80% of the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$User = "your-email"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$PW = "your-password"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$SecPasswd = ConvertTo-SecureString $PW -AsPlainText -Force&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$myCred = New-Object System.Management.Automation.PSCredential($User,$SecPasswd)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;Connect-PowerBIServiceAccount -Credential $myCred&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$DSIDRefresh = "XXXX-XXXX-XXXX-XXXX"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$WSIDAdmin = "XXXX-XXXX-XXXX-XXXX"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$RefreshDSURL = 'groups/' + $WSIDAdmin + '/datasets/' + $DSIDRefresh + '/refreshes'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;Invoke-PowerBIRestMethod -Url $RefreshDSURL -Method Post&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope someone can help me, this script would help a lot.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 10 Aug 2022 20:51:58 GMT</pubDate>
    <dc:creator>gustavofill</dc:creator>
    <dc:date>2022-08-10T20:51:58Z</dc:date>
    <item>
      <title>Powershell Script to Update Dataset Not Working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-Script-to-Update-Dataset-Not-Working/m-p/2693460#M37830</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hey guys! &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I created this script based on some tutorials to update the dataset. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;However, it works sometimes, not always. Below I will put the script and the error it presents around 80% of the time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$User = "your-email"&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$PW = "your-password"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$SecPasswd = ConvertTo-SecureString $PW -AsPlainText -Force&lt;/FONT&gt;&lt;BR /&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$myCred = New-Object System.Management.Automation.PSCredential($User,$SecPasswd)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;Connect-PowerBIServiceAccount -Credential $myCred&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$DSIDRefresh = "XXXX-XXXX-XXXX-XXXX"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$WSIDAdmin = "XXXX-XXXX-XXXX-XXXX"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;$RefreshDSURL = 'groups/' + $WSIDAdmin + '/datasets/' + $DSIDRefresh + '/refreshes'&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="georgia,palatino" color="#0000FF"&gt;Invoke-PowerBIRestMethod -Url $RefreshDSURL -Method Post&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;img /&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Hope someone can help me, this script would help a lot.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 10 Aug 2022 20:51:58 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-Script-to-Update-Dataset-Not-Working/m-p/2693460#M37830</guid>
      <dc:creator>gustavofill</dc:creator>
      <dc:date>2022-08-10T20:51:58Z</dc:date>
    </item>
    <item>
      <title>Re: Powershell Script to Update Dataset Not Working</title>
      <link>https://community.fabric.microsoft.com/t5/Developer/Powershell-Script-to-Update-Dataset-Not-Working/m-p/2695767#M37841</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="javascript:void(0)" data-lia-user-mentions="" data-lia-user-uid="424593" data-lia-user-login="gustavofill" class="lia-mention lia-mention-user"&gt;gustavofill&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Added the code reference. Hope it will be useful!!&lt;/P&gt;&lt;P&gt;Ref -&amp;nbsp;&lt;A href="https://technovert.com/blog/refreshing-all-datasets-in-power-bi-using-rest-api/" target="_blank"&gt;https://technovert.com/blog/refreshing-all-datasets-in-power-bi-using-rest-api/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Hari&lt;/P&gt;&lt;DIV class=""&gt;&lt;DIV&gt;&lt;STRONG&gt;Did I answer your question? Then please mark my post as the solution.&lt;BR /&gt;If I helped you, click on the Thumbs Up to give Kudos.&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://dataap.org/blog/author/hariharanr/" target="_blank" rel="noopener"&gt;&lt;STRONG&gt;My Blog&lt;/STRONG&gt;&lt;/A&gt; :: &lt;A href="https://www.youtube.com/c/HarisBI" target="_blank" rel="nofollow noopener noreferrer"&gt;YouTube Channel&lt;/A&gt; :: &lt;A href="https://www.linkedin.com/in/imhariharanr/" target="_blank" rel="nofollow noopener noreferrer"&gt;My Linkedin&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 11 Aug 2022 15:58:46 GMT</pubDate>
      <guid>https://community.fabric.microsoft.com/t5/Developer/Powershell-Script-to-Update-Dataset-Not-Working/m-p/2695767#M37841</guid>
      <dc:creator>Hariharan_R</dc:creator>
      <dc:date>2022-08-11T15:58:46Z</dc:date>
    </item>
  </channel>
</rss>

