Added list-scripts.ps1

This commit is contained in:
Markus Fleschutz 2020-12-29 14:37:12 +00:00
parent 3b87b47a3b
commit 9618b25d80
3 changed files with 111 additions and 1 deletions

85
Data/scripts.csv Normal file
View File

@ -0,0 +1,85 @@
Filename,Description
check-ipv4-address.ps1, checks the given IPv4 address for validity
check-mac-address.ps1, checks the given MAC address for validity
check-xml-file.ps1, checks the given XML file for validity
clone-repos.ps1, clones well-known Git repositories
close-chrome.ps1, closes Google Chrome gracefully
close-edge.ps1, closes Microsoft Edge gracefully
close-file-explorer.ps1, closes Microsoft File Explorer gracefully
close-program.ps1, closes the given program gracefully
close-thunderbird.ps1, closes Mozilla Thunderbird gracefully
close-windows-terminal.ps1, closes Windows Terminal gracefully
configure-git.ps1, sets up the Git configuration
csv-to-text.ps1, converts the given CSV file into a text list
display-time.ps1, displays the current time
download.ps1, downloads the file/directory from the given URL
empty-dir.ps1, empties the given directory
enable-crash-dumps.ps1, enables the writing of crash dumps
inspect-exe.ps1, prints basic information of the given executable file
list-anagrams.ps1, lists all anagrams of the given word
list-empty-dirs.ps1, lists empty subfolders in a directory tree
list-files.ps1, lists all files in the given folder and also in every subfolder
list-logbook.ps1, lists the content of the logbook
list-unused-files.ps1, lists unused files in a directory tree
list-cmdlets.ps1, lists the PowerShell cmdlets
list-earthquakes.ps1, lists earthquakes with magnitude >= 6.0 for the last 30 days
list-modules.ps1, lists the PowerShell modules
list-news.ps1, lists the latest news
list-processes.ps1, lists the local computer processes
list-random-passwords.ps1, prints a list of random passwords
list-random-pins.ps1, prints a list of random PIN's
list-scripts.ps1, lists the PowerShell scripts in this repository
locate-city.ps1, prints the geographic location of the given city
locate-ipaddress.ps1, prints the geographic location of the given IP address
locate-zip-code.ps1, prints the geographic location of the given zip-code
MD5.ps1, prints the MD5 checksum of the given file
make-install.ps1, installs built executables and libs to the installation directory
moon.ps1, prints the current moon phase
mute-audio.ps1, mutes audio
open-browser.ps1, starts the default Web browser
open-email-client.ps1, starts the default email client
play-beep.ps1, plays a beep sound
poweroff.ps1, halts the local computer (needs administrator rights)
new-email.ps1, starts the default email client to write a new email
reboot.ps1, reboots the local computer (needs administrator rights)
search-files.ps1, searches the given pattern in the given files
scan-ports.ps1, scans the network for open/closed ports
send-email.ps1, sends an email message
send-tcp.ps1, sends a TCP message to the given IP address and port
send-udp.ps1, sends a UDP datagram message to the given IP address and port
set-timer.ps1, sets a timer for a countdown
SHA1.ps1, prints the SHA1 checksum of the given file
SHA256.ps1, prints the SHA256 checksum of the given file
simulate-matrix.ps1, simulates the Matrix (fun)
simulate-presence.ps1, simulates the human presence against burglars
speak-file.ps1, speaks the content of the given text file by text-to-speech (TTS)
speak-text.ps1, speaks the given text by text-to-speech (TTS)
switch-shelly1.ps1, switches a Shelly1 device in the local network
take-screenshot.ps1, takes a single screenshot
take-screenshots.ps1, takes multiple screenshots
test.ps1, simple test script
train-dns-cache.ps1, trains the DNS cache with frequently used domain names
translate-file.ps1, translates the given file from source to target language
translate-text.ps1, translates the given text into other languages
turn-volume-up.ps1, turns the audio volume up (+10% by default)
turn-volume-down.ps1, turns the audio volume down (-10% by default)
txt2wav.ps1, converts text into a audio .WAV file
unmute-audio.ps1, unmutes audio
weather.ps1, prints the current weather forecast
weather-alert.ps1, checks the current weather for critical values
weather-report.ps1, prints the local weather report
weather-worldwide.ps1, prints the current weather of cities worldwide
wakeup.ps1, sends a magic packet to the given computer, waking him up
write-big.ps1, writes the given text in big letters
write-blue.ps1, writes the given text in a blue foreground color
write-braille.ps1, writes the given text in Braille
write-green.ps1, writes the given text in a green foreground color
write-logbook.ps1, writes the given text to the logbook
write-morse-code.ps1, writes the given text in Morse code
write-motd.ps1, writes the message of the day (MOTD)
write-red.ps1, writes the given text in a red foreground color
write-rot13.ps1, encodes or decodes the given text with ROT13
write-typewriter.ps1, writes the given text with the typewriter effect
write-uppercase.ps1, writes the given text in uppercase letters
write-vertical.ps1, writes the given text in vertical direction
zip-dir.ps1, creates a zip archive of the given folder
Can't render this file because it has a wrong number of fields in line 72.

View File

@ -33,9 +33,10 @@ The following PowerShell scripts can be found in the [Scripts/](Scripts/) subfol
* [list-earthquakes.ps1](Scripts/list-earthquakes.ps1) - lists earthquakes with magnitude >= 6.0 for the last 30 days
* [list-modules.ps1](Scripts/list-modules.ps1) - lists the PowerShell modules
* [list-news.ps1](Scripts/list-news.ps1) - lists the latest news
* [list-processes.ps1](Scripts/list-processes.ps1) - lists the local computer processes
* [list-random-passwords.ps1](Scripts/list-random-passwords.ps1) - prints a list of random passwords
* [list-random-pins.ps1](Scripts/list-random-pins.ps1) - prints a list of random PIN's
* [list-processes.ps1](Scripts/list-processes.ps1) - lists the local computer processes
* [list-scripts.ps1](Scripts/list-scripts.ps1) - lists the PowerShell scripts in this repository
* [locate-city.ps1](Scripts/locate-city.ps1) - prints the geographic location of the given city
* [locate-ipaddress.ps1](Scripts/locate-ipaddress.ps1) - prints the geographic location of the given IP address
* [locate-zip-code.ps1](Scripts/locate-zip-code.ps1) - prints the geographic location of the given zip-code

24
Scripts/list-scripts.ps1 Executable file
View File

@ -0,0 +1,24 @@
#!/snap/bin/powershell
<#
.SYNTAX ./list-scripts.ps1
.DESCRIPTION lists the PowerShell scripts in this repository
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
write-progress "Reading scripts.csv..."
$PathToRepo = (get-item $MyInvocation.MyCommand.Path).directory.parent
$Table = import-csv "$PathToRepo/Data/scripts.csv"
write-output ""
write-output "List of PowerShell Scripts"
write-output "=========================="
foreach($Row in $Table) {
write-output "* $($Row.Filename) - $($Row.Description)"
}
exit 0
} catch {
write-error "ERROR in line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}