首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Powershell 6的哪个库包含get-wmiobject命令?

Powershell 6的哪个库包含get-wmiobject命令?
EN

Stack Overflow用户
提问于 2019-02-03 00:27:40
回答 1查看 8K关注 0票数 15

尝试在PowerShell (版本6)中使用get-WmiObject命令时出现以下错误:

代码语言:javascript
复制
PS C:\Users\zsofi> Get-WmiObject Win32_product | select name, packagecache

Get-WmiObject : The term 'Get-WmiObject' is not recognized as the name of a cmdlet, function, script file, or operable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ Get-WmiObject Win32_product | select name, packagecache
+ ~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (Get-WmiObject:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException`
EN

回答 1

Stack Overflow用户

发布于 2019-02-03 02:44:06

据我所知,唯一的方法是兼容性模块。这是Microsoft开发的一个非常简洁的模块,它通过隐式远程连接到同一台计算机上的Windows Powershell 5.1会话,实际上使Windows PS cmdlet在PS Core中可用。https://github.com/PowerShell/WindowsCompatibility

票数 6
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/54495023

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档