DevScope/powerbi-powershell-modules

Error using Import-PBIFile

Opened this issue · 1 comments

Very useful module, I'm using a number of the functions successfully, however I'm encountering a problem with the Import-PBIFile function. Specifically when I run this...

$Groups = Get-PBIGroup
$GroupId = $Groups[1].id.ToString()
$SourceFile = "T:\IT reporting\Power BI\DataModel.pbix"

Import-PBIFile -filePath $SourceFile -nameConflict Overwrite -groupId $GroupId -authToken $authToken -dataSetName "test" 

I get the following error

Invoke-RestMethod : The remote server returned an error: (404) Not Found.
At C:\Program Files\WindowsPowerShell\Modules\PowerBIPS\1.3.4.0\PowerBIPS.psm1:1244 char:12
+ ...   $result = Invoke-RestMethod -Uri $url -Headers $headers -Method Pos ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod], WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

The file exists, the file path is correct, I am an owner of the group

Any ideas where I'm going wrong? Thanks!

Hi Edward, does this problem still persists? I launched a new version that should address the issue you reported.