diff --git a/plugins/guests/windows/scripts/reboot_detect.ps1 b/plugins/guests/windows/scripts/reboot_detect.ps1 index fa2e84ffe..93688ad73 100644 --- a/plugins/guests/windows/scripts/reboot_detect.ps1 +++ b/plugins/guests/windows/scripts/reboot_detect.ps1 @@ -32,6 +32,11 @@ if (ShuttingDown) { exit 2 } + if ($LASTEXITCODE -eq 1115) { + # A system shutdown is in progress + exit 2 + } + # Remove the pending reboot we just created above if ($LASTEXITCODE -eq 0) { . shutdown.exe -a