Import-Module
Import-Module is a PowerShell cmdlet that loads a module and makes its exported commands available in the current session.
Learn PowerShell in a Month of Lunches: Fourth Edition, Covers Windows, Linux, and macOS
Import-Module is a PowerShell cmdlet that loads a module into the current session from a module name or path.
- How it is used
- Loads module commands or providers explicitly when autodiscovery is insufficient or a specific session setup is required.
- 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 you can do after
- Apply it via PowerShell to load modules, resolve conflicts with prefixes, and prepare commands in local or remote sessions.
Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools
Import-Module is a PowerShell cmdlet that loads a module and its exported commands into a session.
- How it is used
- Loads script modules into PowerShell sessions during development, testing, and production-oriented command execution.
- How deep it goes
- Explains path-based loading, forced reimport, and in-memory behavior without detailing module internals.
- Examples
- Uses a ScriptingMOL module, full-path loading, Remove-Module, and Import-Module ScriptingMOL -Force.
- What you can do after
- Operate/configure PowerShell sessions by loading, replacing, and refreshing script modules.
Related concepts
- 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.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

