mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-08-17 16:11:22 +02:00
Added check-windows-system-files.ps1
This commit is contained in:
@ -1,7 +0,0 @@
|
||||
@echo off
|
||||
rem start me as sysadmin
|
||||
|
||||
sfc /VERIFYONLY
|
||||
|
||||
echo DONE.
|
||||
exit /b 0
|
16
Scripts/check-windows-system-files.ps1
Executable file
16
Scripts/check-windows-system-files.ps1
Executable file
@ -0,0 +1,16 @@
|
||||
#!/bin/powershell
|
||||
<#
|
||||
.SYNTAX ./check-windows-system-files.ps1
|
||||
.DESCRIPTION checks the validity of the Windows system files
|
||||
.LINK https://github.com/fleschutz/PowerShell
|
||||
.NOTES Author: Markus Fleschutz / License: CC0
|
||||
#>
|
||||
|
||||
try {
|
||||
sfc /verifyOnly
|
||||
|
||||
exit 0
|
||||
} catch {
|
||||
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
|
||||
exit 1
|
||||
}
|
Reference in New Issue
Block a user