liveBook · Manning

Get-Module

As explained in Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS

Get-Module is a PowerShell cmdlet that lists or retrieves information about modules available in or loaded into a session.

Get-Module lists modules loaded in the current PowerShell session. Add -ListAvailable to find installed modules that are not currently loaded. section 7.2

Check whether Az is installed

Run Get-Module az -ListAvailable after installing the Az module. The results show its directory, module type, version, and name. For exploration, pipe Get-Module to Get-Member to discover available properties. section 7.2 section 21.5

Use Get-Module while investigating module state and administrative commands:

  • Run Get-Module to inspect modules currently loaded in the session. section 7.2
  • Use Get-Module | Remove-Module to clear loaded modules before testing autodiscovery. section 7.3

How Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS covers it

How deep it goes
Demonstrates practical listing, property inspection, and removal, but does not detail cmdlet implementation internals.
Examples
Uses Az verification, Microsoft-module filtering, Get-Member inspection, and clearing loaded modules for autodiscovery tests.
What it assumes
Assumes basic PowerShell command use while introducing module loading, discovery, and property inspection.
What you can do after
Diagnose module availability by distinguishing installed modules from modules loaded in the current session.
How it connects
Connects module discovery with PSModulePath, Import-Module, PowerShellGet, and command autoloading.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS. The section links point to the parts of the book it draws on.