From 39044419499d7f4b8b5a0e10f761663d6a106485 Mon Sep 17 00:00:00 2001 From: David Yoder Date: Mon, 22 Apr 2024 12:48:40 -0400 Subject: [PATCH] better reboot --- Fix-RebootIntoSafeMode.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Fix-RebootIntoSafeMode.ps1 b/Fix-RebootIntoSafeMode.ps1 index 9071777..e77993a 100644 --- a/Fix-RebootIntoSafeMode.ps1 +++ b/Fix-RebootIntoSafeMode.ps1 @@ -29,5 +29,4 @@ Catch { Write-Error "ERROR: could not configure reboot into safe mode with netwo # Reboot into Safe Mode with Networking Write-Output "Rebooting into Safe Mode with Networking" -Try { Start-Sleep -Seconds 5 ; Restart-Computer -Force -ErrorAction Stop} -Catch { Write-Error "ERROR: could not reboot into safe mode with networking" ; Return } \ No newline at end of file +& "${Env:SystemRoot}\System32\shutdown.exe" -r -f -t 5 \ No newline at end of file