-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module
Milestone
Description
Steps to reproduce
> $env:PSModulePath -split ';'
C:\Users\roholt\Documents\PowerShell\Modules
C:\Program Files\PowerShell\Modules
c:\program files\powershell\6-preview\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
> & "$PSHOME\pwsh.exe"
> $env:PSModulePath -split ';'
C:\Users\roholt\Documents\PowerShell\Modules
C:\Program Files\PowerShell\Modules
c:\program files\powershell\6-preview\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
> & "PSHOME\pwsh.exe"
> $env:PSModulePath -split ';'
C:\Users\roholt\Documents\PowerShell\Modules
C:\Program Files\PowerShell\Modules
c:\program files\powershell\6-preview\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
> exit
> $env:PSModulePath -split ';'
C:\Users\roholt\Documents\PowerShell\Modules
C:\Program Files\PowerShell\Modules
c:\program files\powershell\6-preview\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\Modules
> exit
> $env:PSModulePath -split ';'
C:\Users\roholt\Documents\PowerShell\Modules
C:\Program Files\PowerShell\Modules
c:\program files\powershell\6-preview\Modules
C:\WINDOWS\system32\WindowsPowerShell\v1.0\ModulesExpected behavior
System32 module paths don't build up.
Actual behavior
System32 module paths keep getting tacked onto the end of the the PSModulePath.
Pros:
- You always know how many PowerShells deep you are
Cons:
- This is broken
Environment data
> $PSVersionTable
Name Value
---- -----
PSVersion 6.1.0-preview.4
PSEdition Core
GitCommitId 6.1.0-preview.4
OS Microsoft Windows 10.0.18200
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Corecmdlets in the Microsoft.PowerShell.Core modulecmdlets in the Microsoft.PowerShell.Core module