Where the PowerShell Modules are stored?

PowerShellMicrosoft TechnologiesSoftware & Coding

PowerShell modules are stored in their module path. Module paths can be retrieved using an environmental variable $env:PSModulePath. To get a better view, we will split the variable path with a semicolon.

$env:PSModulePath -split ';'

C:\Program Files\WindowsPowerShell\Modules

You can see the 3 paths above. Each path has Modules stored as per their scopes.

  • Documents Path: Modules are stored in this path when you provide the scope – CurrentUser while installing the module.

  • Program files path: Modules are stored in this path when AllUsers Scope is provided.

  • System32 path: It is the default path for the module. Whenever Microsoft updates any PowerShell version or module, it is installed on this location.

Updated on 11-Nov-2020 13:07:57