Fix for implicit remote regression in restricted session#4222
Fix for implicit remote regression in restricted session#4222daxian-dbw merged 3 commits intoPowerShell:masterfrom PaulHigin:ImplicitRemoteBug
Conversation
|
There is no test associated with this fix because we have not ported implicit remoting tests yet. |
|
@PaulHigin we have implicit remoting tests at https://github.com/PowerShell/PowerShell/blob/master/test/powershell/Modules/Microsoft.PowerShell.Utility/Implicit.Remoting.Tests.ps1 |
|
@daxian-dbw Thanks!, I didn't realize these tests were ported. I'll create a test for this fix. |
|
|
||
| if ($originalDefaultParameters -ne $null) | ||
| { | ||
| $PSDefaultParameterValues = $originalDefaultParameters |
There was a problem hiding this comment.
Should be $global:PSDefaultParameterValues = $originalDefaultParameters. Otherwise, you are just defining a variable in the local scope.
|
restarted AppVeyor CI due to MyGet failure |
Issue #4195
PowerShell 5.1 Get-FormatData has a new required parameter (PowerShellVersion) which was not included in restricted sessions. So Import-PSSession fails when trying to use the parameter.
Fix is to add this parameter to the restricted session Get-FormatData proxy function.
Repro: