Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用于Power BI管理的Powershell脚本不';t在标准PS终端中工作_Powershell_Powerbi - Fatal编程技术网

用于Power BI管理的Powershell脚本不';t在标准PS终端中工作

用于Power BI管理的Powershell脚本不';t在标准PS终端中工作,powershell,powerbi,Powershell,Powerbi,当我在Powershell中运行连接PowerBIServiceAccount时,它会弹出Okta窗口供我进行身份验证,这似乎很有效。但是当我运行获取PowerBIWorkspace-All时,我得到以下信息: Get-PowerBIWorkspace : An error occurred while sending the request. At line:1 char:1 + Get-PowerBIWorkspace -All + ~~~~~~~~~~~~~~~~~~~~~~~~~

当我在Powershell中运行连接PowerBIServiceAccount时,它会弹出Okta窗口供我进行身份验证,这似乎很有效。但是当我运行获取PowerBIWorkspace-All时,我得到以下信息:

Get-PowerBIWorkspace : An error occurred while sending the request.
At line:1 char:1
+ Get-PowerBIWorkspace -All
+ ~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : WriteError: (Microsoft.Power...owerBIWorkspace:GetPowerBIWorkspace) [Get-PowerBIWorkspace], HttpRequestException
    + FullyQualifiedErrorId : An error occurred while sending the request.,Microsoft.PowerBI.Commands.Workspaces.GetPowerBIWorkspace
我用谷歌搜索了几个小时,没有发现任何有用的东西。我使用的是MicrosoftPowerBIMgmt的Powershell模块1.0.896版。我试过用小提琴,但没用。有没有调试的方法?我试过使用“-Debug”和“-Verbose”,但都没有用


更新:当在VisualStudio代码中从终端执行时,我试图使用的列出所有工作区/报告/数据集的完整脚本会更进一步,但我不知道为什么。最后它也失败了,说“操作返回了一个无效的状态代码‘TooManyRequests’。”

在这种情况下可能会有用。@AndreyNikolov,这确实有帮助,谢谢!今天,我能够在VS代码中运行脚本,因为显然我没有达到请求限制,不管是什么。我仍然无法单独使用Powershell终端,但现在我可以看到它显示“远程主机强制关闭了现有连接。”