Skip to content

Commit 423712e

Browse files
author
Bruce Payette
authored
Merge pull request PowerShell#60 from sethvs/userPSModulePath
Add User PSModulePath environment variable to Add-WindowsPSModulePath function.
2 parents 4c65936 + 18e049d commit 423712e

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

WindowsCompatibility/WindowsCompatibility.psm1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -754,6 +754,8 @@ function Add-WindowsPSModulePath
754754
"${Env:UserProfile}\Documents\WindowsPowerShell\Modules"
755755
"${Env:ProgramFiles}\WindowsPowerShell\Modules"
756756
"${Env:WinDir}\system32\WindowsPowerShell\v1.0\Modules"
757+
[System.Environment]::GetEnvironmentVariable('PSModulePath',
758+
[System.EnvironmentVariableTarget]::User) -split [System.IO.Path]::PathSeparator
757759
[System.Environment]::GetEnvironmentVariable('PSModulePath',
758760
[System.EnvironmentVariableTarget]::Machine) -split [System.IO.Path]::PathSeparator
759761
)

0 commit comments

Comments
 (0)