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.

Doesn't execute in a runbook #34

@iburki

Description

@iburki

Hello - can you please let me know how to execute this in a runbook? It works using powershell on the desktop, however, when I try to run it in a runbook, I get the error below. Thank you!

Exception calling "AcquireToken" with "4" argument(s): "Unable to find an entry point named 'GetPerAdapterInfo' in DLL
'iphlpapi.dll'."
At line:50 char:8
+        $authResult = $authContext.AcquireToken($resourceAppIdURI, $cl ...
+        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : EntryPointNotFoundException
 
You cannot call a method on a null-valued expression.
At line:59 char:1

  • $authHeader = @{

    + CategoryInfo          : InvalidOperation: (:) [], RuntimeException
    + FullyQualifiedErrorId : InvokeMethodOnNull
 
POST https://api.powerbi.com/v1.0/myorg/groups/xxx with -1-byte payload
Invoke-RestMethod : The remote server returned an error: (403) Forbidden.
At line:80 char:1

  • Invoke-RestMethod -Uri $uri –Headers $authHeader –Method POST –Verbos ...

    + CategoryInfo          : InvalidOperation: (System.Net.HttpWebRequest:HttpWebRequest) [Invoke-RestMethod],
WebException
    + FullyQualifiedErrorId : WebCmdletWebResponseException,Microsoft.PowerShell.Commands.InvokeRestMethodCommand

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions