Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ The environment variables that store preferences include:
The default value of `$Env:PSModulePath` on Windows is:

```powershell
$HOME\Documents\WindowsPowerShell\Modules;$PSHOME\Modules
$HOME\Documents\PowerShell\Modules;$env:PROGRAMFILES\PowerShell\Modules;$PSHOME\Modules
```

The default value of `$Env:PSModulePath` on Linux or macOS is:
Expand All @@ -261,10 +261,14 @@ The environment variables that store preferences include:
$HOME/.local/share/powershell/Modules:/usr/local/share/powershell/Modules:$PSHOME/Modules
```

PowerShell sets the value of `$PSHOME\Modules` in the registry. It sets the
value of `$HOME\Documents\PowerShell\Modules` each time you start PowerShell.
PowerShell will prefix the user module path, the shared module path, and the $PSHOME
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PowerShell prefixes the user module path....

Remove future tense.

module path to `PSModulePath` if it is not already in `PSModulePath`.

In addition, setup programs that install modules in other directories, such as
In addition, on Windows, if the inherited `PSModulePath` is the same as the one stored
as the user environment variable, then the machine `PSModulePath` environment variable
is appended to the end.

Also, setup programs that install modules in other directories, such as
the `Program Files` directory, can append their locations to the value of
PSModulePath.

Expand Down Expand Up @@ -323,6 +327,10 @@ You can add also add a command that changes the value to your profile or use
System in Control Panel to change the value of the `PSModulePath` environment
variable in the registry.

When starting Windows PowerShell or PowerShell ISE, PowerShell will remove the
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When starting Windows PowerShell or PowerShell ISE, PowerShell removes the

Remove future tense

version specific user module path, shared module path, and $PSHOME module path
from `PSModulePath` given to the child process.

For more information, see [about_Modules](about_Modules.md).

## SEE ALSO
Expand Down