gpt4 book ai didi

powershell - 如何解决 PowerShell V5 中的模块嵌套限制已超出错误?

转载 作者:行者123 更新时间:2023-12-03 00:16:21 24 4
gpt4 key购买 nike

刚刚安装了管理框架 5 生产预览版,我的配置文件将不再加载并出现以下错误

Get-Module : Cannot load the module 'UserInfo.psm1' because the module nesting limit has been exceeded. Modules can only be nested to 10 levels. Evaluate and change the order in which you are loading modules to prevent exceeding the nesting limit, and then try running your script again.



有没有办法获得更多细节?
我尝试使用 set-psdebug -trace 2 跟踪执行情况,但我看不到问题...

最佳答案

找到了,我从 .psd1 RequiredModules = @('coresmac','activedirectory') 加载了相同的模块从 .psm1 #requires -modules ActiveDirectory,userinfo .

由于 requires 指令显示为注释,因此很容易错过它...

关于powershell - 如何解决 PowerShell V5 中的模块嵌套限制已超出错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33808039/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com