Skip to content

Commit ee04fe1

Browse files
authored
Create disk_verefication.ps1
1 parent 3b6135a commit ee04fe1

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

powershell/disk_verefication.ps1

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
e$hd = @"
2+
3+
___ _ _ _ __ _ _ _
4+
| \ (_) ___| |__ __ __ ___ _ _ (_) / _|(_) __ __ _ | |_ (_) ___ _ _
5+
| |) || |(_-/| / / \ V // -_)| '_|| || _|| |/ _|/ _` || _|| |/ _ \| ' \
6+
|___/ |_|/__/|_\_\ \_/ \___||_| |_||_| |_|\__|\__/_| \__||_|\___/|_||_|
7+
Github: https://github.com/schsoak
8+
BY: ~#M?x
9+
"@
10+
11+
Write-Host $hd
12+
13+
if ($tru){
14+
Write-Host "[*] Sfc /ScanNow 1/4"
15+
Start-Sleep 2 > $null
16+
Sfc /ScanNow
17+
clear
18+
Write-Host "[*] dism /online /cleanup-image /scanhealth 2/5"
19+
Start-Sleep 2 > $null
20+
dism /online /cleanup-image /scanhealth
21+
clear
22+
Write-Host "[*] dism /online /cleanup-image /restorehealth 3/5"
23+
Start-Sleep 2 > $null
24+
dism /online /cleanup-image /restorehealth
25+
clear
26+
Write-Host "[*] dism /online /cleanup-image /restorehealth 4/5"
27+
Start-Sleep 2 > $null
28+
dism /Online /Cleanup-Image /CheckHealth
29+
clear
30+
Write-Host "[*] Chkdsk 5/5"
31+
Start-Sleep 2 > $null
32+
chkdsk
33+
clear
34+
Write-Host "✔ Verification completed!"
35+
}else {
36+
Write-Host
37+
Write-Host " ⚠ Verification failed"
38+
}

0 commit comments

Comments
 (0)