Pcornel
Browse topics
Options
Recent
Favorites
Windows · Technical reference

Modules

Direct answer

A PowerShell module is a reusable package of commands, types/resources and metadata. Module discovery depends on paths and manifests; import can load a specific implementation/version into the session, while PowerShell 7 may use compatibility mechanisms for some Windows PowerShell modules.

When to use this

Use this topic when a cmdlet is missing, the wrong module version loads, command names collide, a script works only in Windows PowerShell 5.1, or module dependencies/exported commands differ across hosts.

First 30 seconds

1. Get-Module -ListAvailable <name> — installed? Which version?

2. Import-Module <name> — errors?

3. $env:PSModulePath -split ';' — search paths.

4. Install: Install-Module <name> -Scope CurrentUser (or AllUsers).

5. Version conflicts → Import-Module -RequiredVersion.

Operational verification

module in PSModulePath → imported (auto or explicit) → commands available

Evidence · next step

Run a minimal representative command and compare object/result behavior to the expected contract.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Common mistakes
Common traps

Do not fix missing cmdlets by copying module folders blindly. Do not assume newer module is always backward compatible. Avoid relying on auto-load when deterministic startup matters; log module/version provenance for production automation.

Platform / version applicability
Windows execution, automation and observability
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformWindows execution, automation and observability
Scope / prerequisiteUse this topic when a cmdlet is missing, the wrong module version loads, command names collide, a script works only in …
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

1 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 Verification path Verify boundary

On a failing system, compare $PSVersionTable, $env:PSModulePath, Get-Module -ListAvailable and Get-Command <name> -All. Import the intended module/version explicitly in a clean session, then run the smallest read-only target query before trusting a full script.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

observation · 1
Key points
  • Module availability is not the same as module import, and import is not the same as command success.
  • PSModulePath and module manifests influence discovery/version selection.
  • Auto-loading can hide when a module was brought into the session.
  • PowerShell 7 and Windows PowerShell 5.1 can have different module compatibility.
  • Importing one version can change command/type behavior expected by an existing script.
Key checks
  • Get-Module -ListAvailable <name> — installed versions
  • $PSVersionTable — PowerShell edition and version
  • Get-Command <name> — which cmdlet/function/exe runs
  • Get-Help <cmdlet> -Full — syntax and parameters
  • Get-ExecutionPolicy -List — execution policy per scope
ReferenceWhat it is1 section · depth on demand

Core model

Modules are the primary PowerShell unit for reusable command distribution. A manifest can declare version, compatible editions, required modules/assemblies and exported members. The same command name can be exported by multiple modules, making command source part of reproducibility.

ReferenceImportant terms & boundaries2 sections · depth on demand

PowerShell boundary

PowerShell searches module paths and can auto-load a module when a command is invoked. Windows PowerShell 5.1 and PowerShell 7 use different runtimes, so a module that depends on full .NET Framework or Windows-only APIs may require Windows PowerShell or a compatibility approach.

In depth

Modules package functions, cmdlets and resources. Find and install them from the PowerShell Gallery (or an internal repository):

Get-Module -ListAvailable
Find-Module -Name ImportExcel
Install-Module ImportExcel -Scope CurrentUser
Install-PSResource Microsoft.Graph -Scope AllUsers      # PSResourceGet (PS 7.4+)
Import-Module ActiveDirectory
$env:PSModulePath -split ';'

Pin versions in automation (-RequiredVersion), and prefer an internal mirror for production scripts so a compromised or changed public module cannot alter your environment.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docWindows execution, automation and observability current

Authoritative/upstream documentation reviewed for bounded claims in PowerShell → Modules. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://learn.microsoft.com/en-us/powershell/ · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
powershell modulespsmodulepathimport-module powershellpowershell module compatibility
Embedded reference data

Quick lookup tables

PowerShell → Modules reference map

Fast lookup boundaries for PowerShell → Modules.

ItemMeaningEvidence boundary
DiscoveryModule found on search pathnot proof it can import
ManifestMetadata/dependencies/compatibilitymetadata can be incomplete or environment-specific
ImportLoads module into sessionnot proof commands work against target
Version/pathImplementation identitydifferent versions can change behavior
Compatibility modeCross-edition bridgeproxy/serialization can change object behavior
Confirmation

Confirm action

Continue?