From 4fd85abf6742b791005ed6f58325bc3866976214 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Sun, 16 Jul 2023 02:17:03 +0200 Subject: [PATCH] Forcefully restart computer if restarting doesn't work --- scripts/Windows/Scripts/Context.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/Windows/Scripts/Context.ps1 b/scripts/Windows/Scripts/Context.ps1 index 34a8981b..cfb13eef 100644 --- a/scripts/Windows/Scripts/Context.ps1 +++ b/scripts/Windows/Scripts/Context.ps1 @@ -284,7 +284,8 @@ class Context { [void] Reboot() { Write-Host "Restarting Computer..."; $this.RegisterReboot(); - Restart-Computer; + Restart-Computer -Timeout 60; + Restart-Computer -Force; exit; }