Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

MS PowerBI Rest error: Invoke-RestMethod : The 'Content-Type' header must be modified #5

@NancyAb

Description

@NancyAb

Hi,

I have PowerBI setup with a gateway and have been able to refresh the datasource using the MS tools.

I have customized the ps1 program with my company's settings and have installed the PowerShell tools.

When I run the manageRefresh.ps1 command, I get the errors:

Invoke-RestMethod : The 'Content-Type' header must be modified using the appropriate property or method.
Parameter name: name
At C:\temp\manageRefresh.ps1:78 char:1
+ Invoke-RestMethod -Uri $uri -Headers $authHeader -Method POST -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-RestMethod], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Invoke-RestMethod : The 'Content-Type' header must be modified using the appropriate property or method.
Parameter name: name
At C:\temp\manageRefresh.ps1:82 char:1
+ Invoke-RestMethod -Uri $uri -Headers $authHeader -Method GET -Verbose
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [Invoke-RestMethod], ArgumentException
    + FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Any ideas? Thanks in advance for looking. Nancy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions