mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-15 07:12:44 +02:00
Improved check for $lastExitCode
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
|
||||
try {
|
||||
sfc /verifyOnly
|
||||
if ($lastExitCode -ne "0") { throw "'sfc /verifyOnly' failed" }
|
||||
if ($lastExitCode -ne 0) { throw "'sfc /verifyOnly' failed" }
|
||||
|
||||
"✅ checked Windows system files"
|
||||
exit 0 # success
|
||||
|
Reference in New Issue
Block a user