mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-04-21 09:28:21 +02: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-ipv6-address.ps1, checks the given IPv6 address for validity
|
||||||
check-mac-address.ps1, checks the given MAC 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-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
|
check-xml-file.ps1, checks the given XML file for validity
|
||||||
clean-branch.ps1, cleans the current Git branch (including submodules) from generated files
|
clean-branch.ps1, cleans the current Git branch (including submodules) from generated files
|
||||||
clone-repos.ps1, clones well-known Git repositories
|
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)
|
* [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-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
|
* [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)
|
* [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
|
* [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