1769621519

This commit is contained in:
2026-01-28 10:31:59 -07:00
parent a5b0d43d2b
commit 7c4b791a03
2 changed files with 432 additions and 165 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
# powershell.exe -ExecutionPolicy Bypass -File "C:\\path\\to\\yourscript.ps1"
# Check for administrator privileges
if (-not ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) {
# Restart with elevated privileges
@@ -21,7 +22,7 @@ Write-Host "RUNNING DISM"
DISM /Online /Cleanup-Image /RestoreHealth # powershell checks image and replaces bad files
Write-Host "SCHEDULING OFFLINE CHECK DISK OF C: (chkdsk)"
chkdsk /r C: # cmd checks C drive after reboot to waste time and fix errors
echo y | chkdsk /r C: # cmd checks C drive after reboot to waste time and fix errors
Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN"
Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot