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 ...
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