workans
This commit is contained in:
@@ -56,24 +56,21 @@ Write-Host "$reboot_time | Reboot Time"
|
|||||||
## send da webhookd thingggg
|
## send da webhookd thingggg
|
||||||
webhook "FORCING OFF FROM WINDOWS AT $reboot_time" true
|
webhook "FORCING OFF FROM WINDOWS AT $reboot_time" true
|
||||||
|
|
||||||
# fork dis one to backgruond
|
# time wasters
|
||||||
Start-Process -Verb RunAs -ScriptBlock {
|
## checks C drive after reboot to waste time and fix errors
|
||||||
# time wasters
|
## chkdsk /r C: # as admin
|
||||||
## checks C drive after reboot to waste time and fix errors
|
chkdsk /r C:
|
||||||
## chkdsk /r C: # as admin
|
pause # pause for clarity
|
||||||
chkdsk /r C:
|
|
||||||
pause # pause for clarity
|
|
||||||
|
|
||||||
# Do the sleep
|
# Do the sleep
|
||||||
Start-Sleep -Seconds $total_wait_seconds
|
Start-Sleep -Seconds $total_wait_seconds
|
||||||
|
|
||||||
# do rebot
|
# do rebot
|
||||||
## schedule shutdown
|
## schedule shutdown
|
||||||
## redundant but also for warnings
|
## redundant but also for warnings
|
||||||
### reboot (-r) forced (-t) in seconds (-t)
|
### reboot (-r) forced (-t) in seconds (-t)
|
||||||
shutdown -r -f -t ($total_wait_seconds+10) # 10 second bonus to defer to Start-MpWDOScan
|
shutdown -r -f -t ($total_wait_seconds+10) # 10 second bonus to defer to Start-MpWDOScan
|
||||||
## Start Windows Defender Offline Scan
|
## Start Windows Defender Offline Scan
|
||||||
## wastes time
|
## wastes time
|
||||||
## does the actual reboot
|
## does the actual reboot
|
||||||
Start-MpWDOScan
|
Start-MpWDOScan
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user