File tree 2 files changed +15
-9
lines changed 2 files changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -34,24 +34,29 @@ AliasesToExport = @('Add-WinPSModulePath')
34
34
PrivateData = @ {
35
35
PSData = @ {
36
36
Tags = @ (' WindowsPowerShell' , ' Compatibility' , ' Core' )
37
- Prerelease = ' rc1'
38
37
LicenseUri = ' https://opensource.org/licenses/MIT'
39
38
ProjectUri = ' https://github.com/PowerShell/WindowsCompatibility'
40
39
ReleaseNotes = @'
41
- This is the first release candidate (RC) of this module with the following commands:
40
+ This module provides a set of commands that allow you to use
41
+ Windows PowerShell modules from PowerShell Core (PowerShell 6).
42
+ The following commands are included:
42
43
Initialize-WinSession
43
44
Add-WinFunction
44
45
Invoke-WinCommand
45
46
Get-WinModule
46
47
Import-WinModule
47
48
Compare-WinModule
48
49
Copy-WinModule
49
- These commands provide a set of tools allowing you to run Windows PowerShell
50
- commands from PowerShell Core (PowerShell 6). See the help for the
51
- individual commands for examples on how to use this functionality.
50
+ See the help for the individual commands for examples on how
51
+ to use this functionality.
52
52
53
- Additionally, the command `Add-WindowsPSModulePath` enables enumerating
54
- existing Windows PowerShell modules within PowerShell Core 6.
53
+ Additionally, the command `Add-WindowsPSModulePath` will update
54
+ your $ENV:PSModulePath to include Windows PowerShell module directories
55
+ within PowerShell Core 6.
56
+
57
+ NOTE: This release is only intended to be used with PowerShell Core 6
58
+ running on Microsoft Windows. Linux and MacOS are not supported at this
59
+ time.
55
60
'@
56
61
57
62
} # End of PSData hashtable
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ Set-Alias -Name Add-WinPSModulePath -Value Add-WindowsPSModulePath
98
98
# Location Changed handler that keeps the compatibility session PWD in sync with the parent PWD
99
99
# This only applies on localhost.
100
100
$locationChangedHandler = {
101
- [PSSession ] $session = Initialize-WinSession @PSBoundParameters - PassThru
101
+ [PSSession ] $session = Initialize-WinSession - ComputerName $SessionComputerName - ConfigurationName $SessionConfigurationName - PassThru
102
102
if ($session.ComputerName -eq " localhost" )
103
103
{
104
104
$newPath = $_.newPath
@@ -232,7 +232,8 @@ function Initialize-WinSession
232
232
$session = New-PSSession @newPSSessionParameters | Select-Object - First 1
233
233
if ($session.ComputerName -eq " localhost" )
234
234
{
235
- Invoke-Command $session { Set-Location $using :PWD }
235
+ $usingPath = (Get-Location ).Path
236
+ Invoke-Command $session { Set-Location $using :usingPath }
236
237
}
237
238
}
238
239
else
You can’t perform that action at this time.
0 commit comments