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

Wat*_* v2 4 powershell

为什么不在命令结果中列出核心Powershell模块Microsoft.Powershell.CoreGet-Module

Jam*_*rpe 5

文档Get-Module说明:

从Windows PowerShell 3.0开始,Windows PowerShell中包含的核心命令打包在模块中.Microsoft.PowerShell.Core是一个例外,它是一个管理单元(PSSnapin).默认情况下,只会将Microsoft.PowerShell.Core管理单元添加到会话中.模块在首次使用时自动导入,您可以使用Import-Module cmdlet导入它们.

(强调我的)

如果你跑了Get-PSSnapin,你确实看到了:

PS C:\Users\JamesThorpe> 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.