azure - Azure Functions Powershell:无法通过托管依赖项加载模块
问题描述
我们在导入库表单 powershellgallery.com: IntuneWin32App时遇到问题。错误消息如下:
"ERROR: The 'New-IntuneWin32AppPackage' command was found in the module 'IntuneWin32App', but the module could not be loaded."
我们正在运行 Azure 函数 3、Powershell 7.1。IntuneWin32App 通过托管依赖项导入。在“requirements.psd1”中指定如下:
'IntuneWin32App' = '1.*'
我们已经尝试了几种解决此错误相关问题的解决方案,但没有一个可以帮助我们。
编辑:详细输出:https ://pastebin.com/t3kBF00A
我们还将该功能部署到云环境中,并且我们正在那里检索相同的问题。
解决方案
[2021-07-30T06:54:54.792Z] ERROR: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The system cannot find the file specified.
模块是否需要身份验证?它似乎正在尝试启动 PowerShell 7 中不可用的 winforms 窗口。
是否有另一种身份验证机制可以与该模块一起使用,例如阻止窗口的服务主体或证书?
推荐阅读
- javascript - 如何使自动完成数据动态化?
- javascript - CSS打印媒体查询删除空格
- python - 从字符串列表中删除元音
- excel - 在 Excel 中合并来自不同工作表的表格
- odata - 如何在 UseMvc 中间件之外的 .NetCore 3.1 中注册 OData 扩展方法
- css - 无法在桌面上使用 CSS 将 svg 文本路径居中
- c++ - C++ 中类析构函数的奇怪行为
- python - python中的时间序列图分组值
- python - 使用 NodeJS 运行 python 脚本会导致问题
- c# - 替换 Visual Studio-ASP.NET 中的引用时出现问题