PSModulePath environment variable
The PSModulePath environment variable specifies the filesystem directories that PowerShell searches for modules.
Practical Automation with PowerShell: Effective scripting from the console to the cloud
PSModulePath is the PowerShell environment variable containing folders in which PowerShell searches for modules.
- How it is used
- Enables shared custom modules to be discovered and imported by name after installation.
- How deep it goes
- Explains module discovery and a symbolic-link installation workflow, while deferring platform-specific package-manager choices to the environment.
- Examples
- Demonstrates a Git-cloned shared repository linked into a PowerShell module-path folder by an installation script.
- What you can do after
- Operate/configure shared module installation by linking a cloned repository into a PSModulePath folder.
Learn PowerShell Scripting in a Month of Lunches, Second Edition: Write and organize scripts and tools
The PSModulePath environment variable contains the directories that PowerShell searches for modules.
- How it is used
- Guides module placement and automatic discovery during script-module development.
- How deep it goes
- Defines path inspection, default locations, and naming requirements, but does not detail environment-variable customization.
- Examples
- Uses $env:PSModulePath -split ";" and contrasts Documents with Program Files module locations.
- What you can do after
- Operate/configure it to verify searchable directories and place modules where PowerShell can discover them.
Related concepts
- moduleconfigures · 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.
- symbolic linkconfigured by · A symbolic link is a filesystem object that refers to another filesystem path rather than containing the referenced file or directory's contents.
- Import-Moduleconfigures · Import-Module is a PowerShell cmdlet that loads a module and makes its exported commands available in the current session.
- PowerShell profileconfigured by · A PowerShell profile is a user-specific startup script that runs when a PowerShell session starts and can configure its environment.
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.

