close to final rev
This commit is contained in:
@@ -41,16 +41,22 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S
|
|||||||
ipconfig /renew > $null
|
ipconfig /renew > $null
|
||||||
|
|
||||||
Write-Host "LAUNCHING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT) FOLLOW DIRECTIONS FOR FULL SCAN"
|
Write-Host "LAUNCHING WINDOWS MALICIOUS SOFTWARE REMOVAL TOOL (MRT) FOLLOW DIRECTIONS FOR FULL SCAN"
|
||||||
Start-Process "MRT.exe" -NoNewWindow -Wait # builtin malware removal tools -ArgumentList
|
Start-Process -FilePath "MRT.exe" -ArgumentList "/F:Y /Q" -Wait # do full microsoft malicious software removal scan in background, wait to proceed
|
||||||
|
|
||||||
|
Write-Host "UPDATING MALWARE SIGNATURES"
|
||||||
|
Update-MpSignature
|
||||||
|
|
||||||
|
Write-Host "PERFORMING FULL WINDOWS DEFENDER SCAN"
|
||||||
|
Start-MpScan -ScanType FullScan
|
||||||
|
|
||||||
Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP"
|
Write-Host "RUNNING DISM ONLINE IMAGE CLEANUP"
|
||||||
DISM /Online /Cleanup-Image /RestoreHealth
|
DISM.exe /Online /Cleanup-Image /RestoreHealth
|
||||||
|
|
||||||
Write-Host "LAUNCHING SYSTEM FILE CHECKER (SFC)"
|
Write-Host "LAUNCHING SYSTEM FILE CHECKER (SFC)"
|
||||||
SFC /scannow
|
SFC.exe /scannow
|
||||||
|
|
||||||
Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK)"
|
Write-Host "SCHEDULING OFFLINE CHECK DISK AND REPAIR OF C: (CHKDSK)"
|
||||||
echo y | chkdsk.exe /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive)
|
Write-Host y | chkdsk.exe /f /r C: # cmd checks C drive after reboot to waste time and fix errors (noninteractive)
|
||||||
|
|
||||||
Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDL"
|
Write-Host "SCHEDULING WINDOWS DEFENDER OFFLINE SCAN MAY REBOOT UNEXPECTEDL"
|
||||||
Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot
|
Start-MpWDOScan # powershell starts Windows Defender Offline Scan after reboot
|
||||||
@@ -59,5 +65,5 @@ if (-not ([Security.Principal.WindowsIdentity]::GetCurrent().Groups -contains 'S
|
|||||||
mdsched.exe # schedule offline memtest
|
mdsched.exe # schedule offline memtest
|
||||||
|
|
||||||
Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n"
|
Write-Host "`nREBOOTING IN 5 MINUTES MAX PROVBABLY SOONER`n"
|
||||||
shutdown /r /t 300 # shutdown in 5 minutes as failsafe
|
shutdown.exe /r /t 300 # shutdown in 5 minutes as failsafe
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user