Skip to content

Commit 18e049d

Browse files
committed
Add User PSModulePath environment variable.
1 parent 83ec298 commit 18e049d

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)