-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Closed
Labels
OS-WindowsResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).
Description
Prerequisites
- Write a descriptive title.
- Make sure you are able to repro it on the latest released version
- Search the existing issues.
- Refer to the FAQ.
- Refer to Differences between Windows PowerShell 5.1 and PowerShell.
Steps to reproduce
- Create a Hyper-V VM with a current version of Windows 11 (No network adapter needs to be connected)
- Install PowerShell 7.5.3 on the host
- Install PowerShell 7.5.3 in that VM.
- In the VM open an elevated shell and execute
Enable-PSRemoting -SkipNetworkProfileCheck - On the host run this command
$session = New-PSSession -VMName NameOfMyVM Invoke-Command -Session $session -Command { while($true) { Get-Date Start-Sleep -Seconds 10 } } - Wait for 10 minutes
Expected behavior
The Invoke-Command still continues until we manually abort itActual behavior
This error gets thrown after the 10 minutes have expired `The background process reported an error with the following message: "The Hyper-V socket target process has ended.".`Error details
Since PowerShell 7.5.3 we are experiencing an issue when executing long-running commands in Hyper-V VMs. After pretty exactly 10 minutes of usage the connection gets closed. It only happens if it is a single Invoke-Command that takes that much time. Running many short Invoke-Commands with the same session does not lead to this behaviour.
We are doing this on Windows 11 office computers (so no special server). On a few clients the issue does not seem to occur. We haven't found out yet what the important difference is. The issue is somehow also reproducable with PowerShell 5.1 so it may be that something underlying is the root-cause. When rolling back to PowerShell 7.5.2 we don't see this issue anymore.Environment data
Name Value
---- -----
PSVersion 7.5.3
PSEdition Core
GitCommitId 7.5.3
OS Microsoft Windows 10.0.22631
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
A computer not showing the behaviour has the same outputVisuals
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
OS-WindowsResolution-ExternalThe issue is caused by external component(s).The issue is caused by external component(s).