Skip to content

Commit 7b76e65

Browse files
author
Bruce Payette
authored
Merge pull request PowerShell#61 from BrucePay/brucepay_pre_1_0
Updates for release, bug fix for PowerShell#56
2 parents 423712e + ef3fc10 commit 7b76e65

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

WindowsCompatibility/WindowsCompatibility.psd1

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,29 @@ AliasesToExport = @('Add-WinPSModulePath')
3434
PrivateData = @{
3535
PSData = @{
3636
Tags = @('WindowsPowerShell', 'Compatibility', 'Core')
37-
Prerelease = 'rc1'
3837
LicenseUri = 'https://opensource.org/licenses/MIT'
3938
ProjectUri = 'https://github.com/PowerShell/WindowsCompatibility'
4039
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:
4243
Initialize-WinSession
4344
Add-WinFunction
4445
Invoke-WinCommand
4546
Get-WinModule
4647
Import-WinModule
4748
Compare-WinModule
4849
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.
5252
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.
5560
'@
5661

5762
} # End of PSData hashtable

WindowsCompatibility/WindowsCompatibility.psm1

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ Set-Alias -Name Add-WinPSModulePath -Value Add-WindowsPSModulePath
9898
# Location Changed handler that keeps the compatibility session PWD in sync with the parent PWD
9999
# This only applies on localhost.
100100
$locationChangedHandler = {
101-
[PSSession] $session = Initialize-WinSession @PSBoundParameters -PassThru
101+
[PSSession] $session = Initialize-WinSession -ComputerName $SessionComputerName -ConfigurationName $SessionConfigurationName -PassThru
102102
if ($session.ComputerName -eq "localhost")
103103
{
104104
$newPath = $_.newPath
@@ -232,7 +232,8 @@ function Initialize-WinSession
232232
$session = New-PSSession @newPSSessionParameters | Select-Object -First 1
233233
if ($session.ComputerName -eq "localhost")
234234
{
235-
Invoke-Command $session { Set-Location $using:PWD }
235+
$usingPath = (Get-Location).Path
236+
Invoke-Command $session { Set-Location $using:usingPath }
236237
}
237238
}
238239
else

0 commit comments

Comments
 (0)