mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-23 05:01:37 +01:00
Added check-windows-system-files.ps1
This commit is contained in:
parent
caa71389a8
commit
efc8f4e681
@ -5,6 +5,7 @@ check-ipv4-address.ps1, checks the given IPv4 address for validity
|
||||
check-ipv6-address.ps1, checks the given IPv6 address for validity
|
||||
check-mac-address.ps1, checks the given MAC address for validity
|
||||
check-symlinks.ps1, checks every symlink in the given directory tree
|
||||
check-windows-system-files.ps1 - checks the validity of the Windows system files
|
||||
check-xml-file.ps1, checks the given XML file for validity
|
||||
clean-branch.ps1, cleans the current Git branch (including submodules) from generated files
|
||||
clone-repos.ps1, clones well-known Git repositories
|
||||
|
|
@ -31,6 +31,7 @@ Scripts for Computer Management ⚙️
|
||||
---------------------------------
|
||||
* [add-firewall-rules.ps1](Scripts/add-firewall-rules.ps1) - adds firewall rules for the given executables (requires admin rights)
|
||||
* [check-drive-space.ps1](Scripts/check-drive-space.ps1) - checks the given drive for free space left
|
||||
* [check-windows-system-files.ps1](Scripts/check-windows-system-files.ps1) - checks the validity of the Windows system files
|
||||
* [enable-crash-dumps.ps1](Scripts/enable-crash-dumps.ps1) - enables the writing of crash dumps
|
||||
* [hibernate.ps1](Scripts/hibernate.ps1) - enables hibernate mode for the local computer (requires admin rights)
|
||||
* [list-network-shares.ps1](Scripts/list-network-shares.ps1) - lists the network shares of the local computer
|
||||
|
@ -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
|
||||
}
|
Loading…
Reference in New Issue
Block a user