PowerShell

Where the heck is the PowerShell Module loading from?

If you’re anything like me you always have PowerShell open, and often both PowerShell and Windows PowerShell. And PowerShell in VSCode and Terminal (and sometimes Jupyter Notebook, and WSL – Windows Subsystem for Linux).

There WILL come a point on Windows when you want to know where the heck is the PowerShell Module loading from (especially when using Windows PowerShell). Maybe you want to look inside the module to tweak it or understand how it is or isn’t working.

Windows PowerShell

The common module installation paths are:

  • C:\Windows\System32\WindowsPowerShell\v1.0\Modules
  • C:\Users\<yourprofilename>\Documents\WindowsPowerShell\Modules
  • C:\Program Files\WindowsPowerShell\Modules
  • C:\Program Files (x86)\WindowsPowerShell\Modules

PowerShell

The typical path is:

  • C:\Users\<yourprofilename>\Documents\PowerShell\Modules

Alternative Solution – Where the heck is the PowerShell Module loading from?

Rather than opening each of the folders where modules could be located, running the following one-liner from your PowerShell session will show the module version(s) and location(s).

$(Get-Module <modulename> -ListAvailable | select-object).path

To open the location in explorer the following one-liner will take the first location found for the module and open the path in Explorer.

explorer.exe (Split-Path $(Get-Module <modulename> -ListAvailable | select-object -First 1).path -Parent)

Summary

Hopefully this helps someone else. If nothing else I know I’ll be able to quickly find the one-liner with explorer syntax to open the location and answer that often frustration question, “Where the heck is the PowerShell Module loading from?”

Darren Robinson

Bespoke learnings from a Microsoft Identity and Access Management Architect using lots of Microsoft Identity Manager, Azure Active Directory, PowerShell, SailPoint IdentityNow and Lithnet products and services.

Recent Posts

Entra Auth Tracer – A Browser Extension for Deep Inspection of Microsoft Entra Authentication Flows

If you've ever needed to debug a Microsoft Entra (Azure AD) authentication flow, you'll know…

2 weeks ago

Entra Provision On Demand PowerShell Module

It’s 2026 and somehow I keep finding myself back in 2016, integrating heritage applications into…

3 weeks ago

Entra News MCP Server

I’ve just published an MCP server that turns Merill & Joshua’s weekly Entra News newsletter…

4 weeks ago

Entra ECMA2Host Tools PowerShell Module

If you've ever worked with the ECMA2Host for Entra Outbound Provisioning you'll be immediately presented…

4 months ago

PowerShell 7 Support Arrives for the Granfeldt PowerShell Management Agent

For over a decade, the Granfeldt PowerShell Management Agent (PSMA) has been the bedrock for…

6 months ago

PowerShell MCP Azure Function Server

Recently under the experimental Azure Functions build Microsoft Developer Advocates have shown enabling Azure Functions…

7 months ago

This website uses cookies.