PowerShell / PowerShell

PowerShell for every system!
https://microsoft.com/PowerShell
MIT License
44.61k stars 7.22k forks source link

Invoke-Command not reconnecting from Linux to Windows #20666

Open upload2raj opened 10 months ago

upload2raj commented 10 months ago

Prerequisites

Steps to reproduce

Install latest version of powershell7 on Linux Environment. Install latest version of powershell7 on a windows machine. Execute any command from Linux machine to windows machine using Invoke-Command which will interrupt network temporarily. In my case Remove-VMSwitch .

Expected behavior

Invoke-Command needs to try reconnecting
In Windows to Windows remoting it tries to reconnect for 4 minutes

Actual behavior

Invoke-Command is hung for ever

Error details

No response

Environment data

Linux Client
------------
Name                           Value
----                           -----
PSVersion                      7.3.9
PSEdition                      Core
GitCommitId                    7.3.9
OS                             Linux 4.18.0-513.el8.x86_64 #1 SMP Fri Aug 25 14:33:28 UTC 2023
Platform                       Unix
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Windows Server:
---------------
Name                           Value
----                           -----
PSVersion                      7.3.9
PSEdition                      Core
GitCommitId                    7.3.9
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

StevenBucher98 commented 9 months ago

Does this still occur in 7.4?

upload2raj commented 9 months ago

Does this still occur in 7.4?

Yes even after upgrading Linux and windows powershell to 7.4.0 same issue

Azziii commented 4 months ago

Confirmed for 7.5-preview. The problem appeared after installing updates for Windows, before that everything worked.