Reputation: 33880
Why isn't the core Powershell module Microsoft.Powershell.Core listed in the results of the Get-Module
command?
Upvotes: 5
Views: 257
Reputation: 32222
The docs for Get-Module
specify:
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.
(emphasis mine)
If you run Get-PSSnapin
instead, you do indeed see it:
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.
Upvotes: 5