Import-Module is a PowerShell cmdlet that loads a module into the current session from a module name or path.
Import-Module loads a PowerShell module into the current session. Give it a module name when the module is discoverable, or a complete path when it is outside PSModulePath. section 7.3
Use explicit importing when you need to control how a module becomes available:
Invoke-Command -ScriptBlock { Import-Module ServerManager } -Session $session loads ServerManager remotely; Import-PSSession can then bring its commands into the local session with a prefix. section 18.7
How Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS covers it
How deep it goes
Explains names, paths, forced reloads, prefixes, and remote use, but stops short of module implementation internals.
Examples
Demonstrates named and path-based imports, forced GoogleCloud loading, prefixed commands, and remote ServerManager loading.
What it assumes
Assumes basic PowerShell sessions and commands while explaining module names, paths, PSModulePath, and autodiscovery.
What you can do after
Apply it via PowerShell to load modules, resolve conflicts with prefixes, and prepare commands in local or remote sessions.
How it connects
Connects module loading with PSModulePath, command autodiscovery, command conflicts, Remove-Module, and Import-PSSession.
moduleuses · A module is a distinct, bounded software unit that groups related code or functionality and provides an organizational or interaction boundary within a larger system.
PSModulePath environment variableconfigured by · The PSModulePath environment variable specifies the filesystem directories that PowerShell searches for modules.
approved verbuses · An approved verb is a verb from PowerShell's standardized vocabulary for naming commands according to their operations.
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.