尝试导入oh-my-posh' Windows终端中的导入模块
我安装了oh我的posh模块,并试图用import-odule-oh-my-posh
导入它。但是我会收到以下错误,
Downloading oh-my-posh executable for 7.36.1
Get-CimInstance : Invalid class
At C:\Program Files\WindowsPowerShell\Modules\oh-my-posh\7.36.1\oh-my-posh.psm1:66 char:18
+ ... $arch = (Get-CimInstance -Class Win32_Processor -Property Architec ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Get-CimInstance], CimException
+ FullyQualifiedErrorId : HRESULT 0x80041010,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
Import-Module : oh-my-posh: Unsupported architecture:
At line:1 char:1
+ Import-Module oh-my-posh
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (oh-my-posh: Unsupported architecture: :String) [Import-Module], Runti
meException
+ FullyQualifiedErrorId : oh-my-posh: Unsupported architecture: ,Microsoft.PowerShell.Commands.ImportModuleCommand
为什么我会得到这个?我在set-executionpolicy无限制
之前运行
I installed the oh my posh module and am trying to import it with Import-Module oh-my-posh
. But I'm getting the following error
Downloading oh-my-posh executable for 7.36.1
Get-CimInstance : Invalid class
At C:\Program Files\WindowsPowerShell\Modules\oh-my-posh\7.36.1\oh-my-posh.psm1:66 char:18
+ ... $arch = (Get-CimInstance -Class Win32_Processor -Property Architec ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : MetadataError: (:) [Get-CimInstance], CimException
+ FullyQualifiedErrorId : HRESULT 0x80041010,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
Import-Module : oh-my-posh: Unsupported architecture:
At line:1 char:1
+ Import-Module oh-my-posh
+ ~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (oh-my-posh: Unsupported architecture: :String) [Import-Module], Runti
meException
+ FullyQualifiedErrorId : oh-my-posh: Unsupported architecture: ,Microsoft.PowerShell.Commands.ImportModuleCommand
Why am I getting this? I ran Set-ExecutionPolicy Unrestricted
before
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该模块不再支持,因此由于此问题而解决了此问题。看看在这里让您再次前进。
The module is no longer supported, and this issue has been resolved in the meantime because of it. Have a look here to get you going again.