Module imports but command is missing
Documentation: Microsoft Learn
Work the problem
Import succeeded
Fictional case: A module imports without error, but the expected command is absent from Get-Command -Module. Another host has a newer module version.
Reasoning notebook
Record the evidence that supports your answer and the check you would run next. Your notes stay in this browser — nothing is uploaded.
Why it happens
A manifest controls which functions get exported, so a command defined inside the module can be excluded from FunctionsToExport deliberately or by accident. Side-by-side versions matter too, since the newest available loads by default and the command may only exist in an older one. Sometimes the command is simply remembered from a different module and attributed to this one.
Check this first
What to look for
Import success means a module loaded, not that every command you expected exists in that version or is exported.
Working through it
- Run Get-Command -Module ModuleName and read the list of commands actually exported.
- Compare that against Get-Module ModuleName -ListAvailable to see how many versions are installed.
- Import a specific version with -RequiredVersion when more than one is present.
- Search everything with Get-Command YourCommand -All, which reveals whether it belongs to a different module.
- Check the manifest's FunctionsToExport entry if you own the module, since a wildcard behaves differently from an explicit list.
Avoiding it next time
Verify the repair: Use a clean session with the intended module version and verify the exact command and syntax.
Primary documentation
Work through the incident
Inspect module exports
Import-Module succeeds, but the expected function is unavailable.
The sandbox is visible now. Sign in with Google only when you run or check a task; commands and temporary files are discarded when you leave.
Run a command to inspect its result.