DevScope/powerbi-powershell-modules

Update-PBIDatasetDatasources error

zbroinx opened this issue · 0 comments

When I try to run:
Get-PBIDataSet -name "Teste1" | Update-PBIDatasetDatasources -datasourceType Sql -originalServer "azrsql01001\sql" -originalDatabase "database1" -targetServer "sql01" -targetDatabase "database2"

I get the error:
Invoke-PBIRequest : The remote server returned an error: (400) Bad Request. - '{"error":{"code":"BadRequest","message":"Bad Request","details":[{"message":"Bad JSON escape sequence: \\s. Path 'updateDetails[0].datasourceSelector.connectionDetails.server', line 14, position 44.","target":"updateDatasourcesRequest.updateDetails[0].datasourceSelector.connectionDetails.server"},{"message":"'updateDatasourcesRequest' is a required parameter","target":"updateDatasourcesRequest"}]}}' At C:\Program Files\WindowsPowerShell\Modules\PowerBIPS\2.0.4.2\PowerBIPS.psm1:2193 char:3 Invoke-PBIRequest -authToken $authToken -method Post -resourc ... ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ CategoryInfo : NotSpecified: (:) [Write-Error], WebException FullyQualifiedErrorId : System.Net.WebException,Invoke-PBIRequest