From 16d74d7be4a265a583fe06a1ca551b2765419ff8 Mon Sep 17 00:00:00 2001 From: Jonathan Woodard Date: Thu, 31 Oct 2019 19:07:27 -0700 Subject: [PATCH] Update manageRefresh.ps1 to fix error In issue #5, it's pointed out in https://github.com/Azure-Samples/powerbi-powershell/issues/5#issuecomment-365752905 that the Invoke-RestMethod parameter names have long dashes, which causes problems. This changes the en dashes to dashes, which fixed the error. --- manageRefresh.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/manageRefresh.ps1 b/manageRefresh.ps1 index fd8d3b4..1ae6e58 100644 --- a/manageRefresh.ps1 +++ b/manageRefresh.ps1 @@ -71,8 +71,8 @@ if ($groupID -eq "me") { # Refresh the dataset $uri = "https://api.powerbi.com/v1.0/$groupsPath/datasets/$datasetID/refreshes" -Invoke-RestMethod -Uri $uri –Headers $authHeader –Method POST –Verbose +Invoke-RestMethod -Uri $uri -Headers $authHeader -Method POST -Verbose # Check the refresh history $uri = "https://api.powerbi.com/v1.0/$groupsPath/datasets/$datasetID/refreshes" -Invoke-RestMethod -Uri $uri –Headers $authHeader –Method GET –Verbose \ No newline at end of file +Invoke-RestMethod -Uri $uri -Headers $authHeader -Method GET -Verbose