chocolatey/boxstarter

Remote reboot logic is broken when targeting Windows 11 machines

Opened this issue · 0 comments

What You Are Seeing?

Whenever Boxstarter tries to restart the machine remotely, it will reconnect the Powershell session before the restart actually happens, which leads to failure.
image
Boxstarter correctly detects the severed remote session as the restart is triggered, but will reconnect (see the red arrow in the image) before the machine actually restarts (still on the restarting splash screen), which ultimately leads to the I/O error in the image.

What Is Expected?

The machine is supposed to wait with reestablishing remoting until machine has fully rebooted.

How Did You Get This To Happen? (Steps to Reproduce)

Trigger a remote install using the following command: Install-BoxstarterPackage -ComputerName $hostname -PackageName $package -Credential $cred -StopOnPackageFailure and triggering a restart from within the BoxStarter package with Invoke-Reboot

Output Log