[Powershell] remote powershell should exit when connection closes
Steps to Repro:
1. Install WAC Version 1809 (Build 1.1.1809.17002) on Windows 10
2. Connect to a remote server running Server 2016
3. Open the "PowerShell" tool
4. Provide credentials for the remote PowerShell
5. <do work>
6. In PowerShell, run the command 'exit'
PowerShell disconnects and need to be reconnected.
PowerShell on the remote server properly exits as expected, but the console remains with a PowerShell console for the local machine.
Use PowerShell's built-in ability to run a command and immediately exit when that command completes, such as the command-line option "-Command" as documented at https://docs.microsoft.com/en-us/powershell/scripting/core-powershell/console/powershell.exe-command-line-help?view=powershell-6#-command
We can’t reproduce this, we get the Expected results:
“PowerShell disconnects and need to be reconnected.”
Karl Wester-Ebbinghaus (@tweet_alqamar) commented
can confirm Jeffs comment. PS-connection will be terminated