Added check-windows-system-files.ps1

This commit is contained in:
Markus Fleschutz 2021-02-26 19:41:03 +01:00
parent caa71389a8
commit efc8f4e681
4 changed files with 18 additions and 7 deletions

View File

@ -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

1 Script Script,Description Description
5 check-ipv6-address.ps1 check-ipv6-address.ps1, checks the given IPv6 address for validity checks the given IPv6 address for validity
6 check-mac-address.ps1 check-mac-address.ps1, checks the given MAC address for validity checks the given MAC address for validity
7 check-symlinks.ps1 check-symlinks.ps1, checks every symlink in the given directory tree checks every symlink in the given directory tree
8 check-windows-system-files.ps1 - checks the validity of the Windows system files
9 check-xml-file.ps1 check-xml-file.ps1, checks the given XML file for validity checks the given XML file for validity
10 clean-branch.ps1 clean-branch.ps1, cleans the current Git branch (including submodules) from generated files cleans the current Git branch (including submodules) from generated files
11 clone-repos.ps1 clone-repos.ps1, clones well-known Git repositories clones well-known Git repositories

View File

@ -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

View File

@ -1,7 +0,0 @@
@echo off
rem start me as sysadmin
sfc /VERIFYONLY
echo DONE.
exit /b 0

View 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
}