import-module with $MaximumFunctionCount = 32768 fails in PowerShell 5.1
维护者通常 2 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 35/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- powershell
- 领域
- cli
调研方向
首先,重现分别在 PowerShell 5.1 脚本中和命令行中运行所提供赋值时的差异,然后在两种情况下都导入 microsoft.graph 并比较错误。当模块导入在两种上下文中的行为一致,或者记录了 PowerShell 5.1 的限制和解决方法时,该问题即得到解决。
由索引模型根据 Issue 内容生成。
描述
Describe the bug
import-module microsoft.graph with $MaximumFunctionCount = 32768 fails in PowerShell 5.1 when the variable is set in the script, but works fine if it is done on the command line.
##
## Setting in script
##
if ( 32768 -gt $MaximumVariableCount ) {
$MaximumVariableCount = 32768;
};
if ( 32768 -gt $MaximumFunctionCount ) {
$MaximumFunctionCount = 32768;
};
"MaximumVariableCount $MaximumVariableCount ";
"MaximumFunctionCount $MaximumFunctionCount";
Script display unfortunately with error messages in Norwegian. But you get the drift.
BTW. I know this works fine in PowerShell 7.x, but those who run this might not have that installed.
Expected behavior
That import-module works the same whether it is a script or on command line in PowerShell 5.1.
How to reproduce
Run script or copy commands from script to command line.
SDK Version
No response
Latest version known to work for scenario above?
No response
Known Workarounds
No response
Debug output
Click to expand log
```</details>
### Configuration
_No response_
### Other information
_No response_
- 主要语言
- C#
- 星标
- 902
- 派生
- 233
- 平均合并
- 1 天 22 小时
- 30 天内合并 PR
- 29
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
microsoftgraph/msgraph-sdk-powershell 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 84/100
microsoftgraph/msgraph-sdk-powershell#3752 ·
维护者通常 2 天内回复
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 22/100
microsoftgraph/msgraph-sdk-powershell#3822 ·
维护者通常 2 天内回复
-
status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 48/100
microsoftgraph/msgraph-sdk-powershell#3819 ·
维护者通常 2 天内回复
-
Connect-MgGraph on 2.41 crashes when making a connection with cert, fixes when using 2.39 or lower未关闭status:waiting-for-triage type:bug
难度 4/5 3-5 天 新手友好度 48/100
microsoftgraph/msgraph-sdk-powershell#3816 ·
维护者通常 2 天内回复
-
status:waiting-for-triage type:feature
难度 4/5 3-5 天 新手友好度 45/100
microsoftgraph/msgraph-sdk-powershell#3806 · 3 条评论 · 3 个 reaction ·
维护者通常 2 天内回复
查看 microsoftgraph/msgraph-sdk-powershell 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 83/100
-
[誤判定] `define` が `デフィね`・`デフィ値` になる可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭再現済み 要トリアージ 誤判定
难度 2/5 1-3 小时 新手友好度 72/100
yksr-melt/Meltype#421 · 1 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 64/100
Facepunch/sbox-public#12063 · 1 条评论 ·
维护者通常 2 天内回复
-
documentation
难度 2/5 1-3 小时 新手友好度 84/100
facioquo/stock-indicators-dotnet#2316 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
ionide/FsAutoComplete#1559 ·