You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-UseWindowsPowerShell:$false should behave the same as omitting the -UseWindowsPowerShell switch, creating a session with the default PowerShell endpoint.
-UseWindowsPowerShell:$false behaves the same as -UseWindowsPowerShell or -UseWindowsPowerShell:$true, creating a session with Windows PowerShell 5.1 endpoint.
Error details
No error is thrown. The cmdlet executes but ignores the explicit $false value.
Environment data
PS>$PSVersionTable
Name Value
---------
PSVersion 7.5.4
PSEdition Core
GitCommitId 7.5.4
OS Microsoft Windows 10.0.26100
Platform Win32NT
PSCompatibleVersions {1.0,2.0,3.0,4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Prerequisites
Steps to reproduce
This is a sub-issue of #25242.
The cmdlet
New-PSSessiondoes not respect explicit$falsevalues for the-UseWindowsPowerShellswitch parameter.Expected behavior
-UseWindowsPowerShell:$falseshould behave the same as omitting the-UseWindowsPowerShellswitch, creating a session with the default PowerShell endpoint.Actual behavior
-UseWindowsPowerShell:$falsebehaves the same as-UseWindowsPowerShellor-UseWindowsPowerShell:$true, creating a session with Windows PowerShell 5.1 endpoint.Error details
No error is thrown. The cmdlet executes but ignores the explicit
$falsevalue.Environment data
Visuals
No response