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

PowerShell MCP Azure Function Server

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

2 weeks ago

EntraPulse – Your AI-Powered Gateway to Microsoft Graph & Docs

Today, I’m super excited to finally announce the Beta release of EntraPulse Lite – a…

2 months ago

Lokka MCP Authentication Enhancements

I'm excited to share some significant authentication enhancements I've contributed to the Lokka MCP Server…

3 months ago

AI Inception: Building AI Solutions with AI for AI

Last month I had the pleasure of speaking at the Sydney event for Global Azure.…

4 months ago

A Have I Been Pwned MCP Server for Claude

Model Context Protocol (MCP) is a powerful framework that extends AI clients like Claude and…

6 months ago

Azure AI Developer Hackathon

I've just completed participating in the Azure AI Developer Hackathon that was looking to provide…

6 months ago

This website uses cookies.