加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

为什么我在Get-Module的结果中没有列出Microsoft.Powershell.Cor

发布时间:2020-12-14 04:26:20 所属栏目:Windows 来源:网络整理
导读:为什么Get-Module命令的结果中没有列出核心Power shell模块Microsoft.Powershell.Core? 解决方法 获取模块的 docs指定: Beginning in Windows PowerShell 3.0,the core commands that are included in Windows PowerShell are packaged in modules. The ex
为什么Get-Module命令的结果中没有列出核心Power shell模块Microsoft.Powershell.Core?

解决方法

获取模块的 docs指定:

Beginning in Windows PowerShell 3.0,the core commands that are included in Windows PowerShell are packaged in modules. The exception is Microsoft.PowerShell.Core,which is a snap-in (PSSnapin). By default,only the Microsoft.PowerShell.Core snap-in is added to the session. Modules are imported automatically on first use and you can use the Import-Module cmdlet to import them.

(强调我的)

如果你改为运行Get-PSSnapin,你确实看到了它:

PS C:UsersJamesThorpe> get-pssnapin

Name        : Microsoft.PowerShell.Core
PSVersion   : 5.1.15063.502
Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读