better reboot

This commit is contained in:
2024-04-22 12:48:40 -04:00
parent af90aba365
commit 3904441949
+1 -2
View File
@@ -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 }
& "${Env:SystemRoot}\System32\shutdown.exe" -r -f -t 5