From c566a1a79bee6f4c021dd5b57bdeb5efde83c46e Mon Sep 17 00:00:00 2001 From: PrincessPi3 Date: Fri, 26 Sep 2025 22:31:23 -0600 Subject: [PATCH] workans --- Windows-Scripts/force_me_off.ps1 | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/Windows-Scripts/force_me_off.ps1 b/Windows-Scripts/force_me_off.ps1 index d9aa28d..fd1c09e 100644 --- a/Windows-Scripts/force_me_off.ps1 +++ b/Windows-Scripts/force_me_off.ps1 @@ -62,15 +62,17 @@ webhook "FORCING OFF FROM WINDOWS AT $reboot_time" true chkdsk /r C: pause # pause for clarity -# Do the sleep -Start-Sleep -Seconds $total_wait_seconds +Start-Process -ScriptBlock { + # Do the sleep + Start-Sleep -Seconds $total_wait_seconds -# do rebot -## schedule shutdown -## redundant but also for warnings -### reboot (-r) forced (-t) in seconds (-t) -shutdown -r -f -t ($total_wait_seconds+10) # 10 second bonus to defer to Start-MpWDOScan -## Start Windows Defender Offline Scan -## wastes time -## does the actual reboot -Start-MpWDOScan \ No newline at end of file + # do rebot + ## schedule shutdown + ## redundant but also for warnings + ### reboot (-r) forced (-t) in seconds (-t) + shutdown -r -f -t ($total_wait_seconds+10) # 10 second bonus to defer to Start-MpWDOScan + ## Start Windows Defender Offline Scan + ## wastes time + ## does the actual reboot + Start-MpWDOScan +} \ No newline at end of file