500+ PowerShell scripts (.ps1) for every system!
Go to file
2021-08-30 10:09:33 +02:00
Data Add subfolder Docs 2021-08-29 12:20:37 +02:00
Docs Update FAQ.md 2021-08-30 09:29:47 +02:00
Scripts Update the manuals 2021-08-29 18:27:03 +02:00
LICENSE Initial commit 2020-04-30 17:49:27 +02:00
README.md Update README.md 2021-08-30 10:09:33 +02:00

Mega Collection of PowerShell Scripts

This repository provides more than 200 useful and cross-platform PowerShell scripts in the Scripts subfolder - to be used by command-line interface (CLI), for remote control (e.g. via SSH), by context menu, by voice control, by automation software like Jenkins, automatically as daily tasks, or simply to learn PowerShell. See the PowerShell FAQ page if you need help or have any questions.

Note: the scripts fully support Unicode I/O. It's recommended to use a modern console supporting UTF-8 (e.g. Windows Terminal).

🔊 Scripts for Audio & Voice

Script Description Manual
mute-audio.ps1 mutes the audio device Manual
list-voices.ps1 lists the installed text-to-speech (TTS) voices Manual
play-beep.ps1 plays a beep sound Manual
play-files.ps1 plays the given audio files Manual
play-happy-birthday.ps1 plays the Happy Birthday song Manual
play-imperial-march.ps1 plays the Imperial March (Star Wars) Manual
play-jingle-bells.ps1 plays Jingle Bells Manual
play-mission-impossible.ps1 plays the Mission Impossible theme Manual
play-m3u.ps1 plays the given playlist (M3U file format) Manual
play-mp3.ps1 plays the given sound file (MP3 file format) Manual
play-super-mario.ps1 plays the Super Mario Intro Manual
play-tetris-melody.ps1 plays the Tetris melody Manual
speak-checklist.ps1 speaks the given checklist by text-to-speech (TTS) Manual
speak-countdown.ps1 starts a countdown by text-to-speech (TTS) Manual
speak-date.ps1 speaks the current date by text-to-speech (TTS) Manual
speak-english.ps1 speaks the given text with an English text-to-speech (TTS) voice Manual
speak-epub.ps1 speaks the content of the given Epub file by text-to-speech (TTS) Manual
speak-file.ps1 speaks the content of the given text file by text-to-speech (TTS) Manual
speak-french.ps1 speaks the given text with a French text-to-speech (TTS) voice Manual
speak-german.ps1 speaks the given text with a German text-to-speech (TTS) voice Manual
speak-italian.ps1 speaks the given text with an Italian text-to-speech (TTS) voice Manual
speak-joke.ps1 speaks a random Chuck Norris joke by text-to-speech (TTS) Manual
speak-quote.ps1 speaks a random quote by text-to-speech (TTS) Manual
speak-spanish.ps1 speaks the given text with a Spanish text-to-speech (TTS) voice Manual
speak-test.ps1 performs a speak test by text-to-speech (TTS) Manual
speak-text.ps1 speaks the given text by text-to-speech (TTS) Manual
speak-time.ps1 speaks the current time by text-to-speech (TTS) Manual
turn-volume-up.ps1 turns the audio volume up (+10% by default) Manual
turn-volume-down.ps1 turns the audio volume down (-10% by default) Manual
unmute-audio.ps1 unmutes the audio device Manual
voice-control.ps1 executes the PowerShell scripts by voice Manual

⚙️ Scripts to Manage Computers

Script Description Manual
add-firewall-rules.ps1 adds firewall rules for the given executables (needs admin rights)
check-cpu-temp.ps1 checks the CPU temperature
check-dns-resolution.ps1 checks the DNS resolution with frequently used domain names
check-drive-space.ps1 checks the given drive for free space left
check-file-system.ps1 checks the validity of the file system (needs admin rights)
check-health.ps1 checks the system health
check-ping.ps1 checks the ping latency to the internet
check-swap-space.ps1 checks the swap space for free space left
check-windows-system-files.ps1 checks the validity of the Windows system files (needs admin rights)
enable-crash-dumps.ps1 enables the writing of crash dumps
hibernate.ps1 enables hibernate mode for the local computer (needs admin rights)
install-github-cli.ps1 installs GitHub CLI
install-google-chrome.ps1 installs the Google Chrome browser
install-knot-resolver.ps1 installs the Knot Resolver (needs admin rights)
install-ssh-client.ps1 installs the SSH client (needs admin rights)
install-ssh-server.ps1 installs the SSH server (needs admin rights)
install-signal-cli.ps1 installs signal-cli from github.com/AsamK/signal-cli
install-wsl.ps1 installs Windows Subsystem for Linux (WSL), needs admin rights
list-cli-tools.ps1 lists available command-line interface (CLI) tools
list-drives.ps1 lists all drives
list-network-shares.ps1 lists the network shares of the local computer
list-installed-apps.ps1 lists the installed Windows Store apps
list-installed-software.ps1 lists the installed software (except Windows Store apps)
list-printers.ps1 lists all printer known to the computer
list-processes.ps1 lists the local computer processes
list-services.ps1 lists the services on the local computer
list-system-info.ps1 lists system information on the local computer
list-tasks.ps1 lists all Windows scheduler tasks
list-timezone.ps1 lists the current time zone details
list-timezones.ps1 lists all time zones available
list-user-groups.ps1 lists the user groups on the local computer
poweroff.ps1 halts the local computer (needs admin rights)
query-smart-data.ps1 queries the S.M.A.R.T. data of your HDD/SSD's
reboot.ps1 reboots the local computer (needs admin rights)
restart-network-adapters.ps1 restarts all local network adapters
upgrade-ubuntu.ps1 upgrades Ubuntu Linux to the latest (LTS) release
wakeup.ps1 sends a magic packet a computer to wake him up

💻 Scripts for the Desktop

Script Description Manual
close-calculator.ps1 closes the calculator program gracefully
close-chrome.ps1 closes Google Chrome gracefully
close-cortana.ps1 closes Cortana gracefully
close-edge.ps1 closes Microsoft Edge gracefully
close-file-explorer.ps1 closes Microsoft File Explorer gracefully
close-firefox.ps1 closes the Firefox Web browser gracefully
close-program.ps1 closes the given program gracefully
close-netflix.ps1 closes Netflix gracefully
close-onedrive.ps1 closes Microsoft OneDrive gracefully
close-system-settings.ps1 closes the System Settings gracefully
close-thunderbird.ps1 closes Mozilla Thunderbird gracefully
close-vlc.ps1 closes the VLC media player gracefully
close-windows-terminal.ps1 closes Windows Terminal gracefully
enable-god-mode.ps1 enables the god mode (adds a new icon to the desktop)
list-clipboard.ps1 lists the contents of the clipboard
new-email.ps1 starts the default email client to write a new email
open-browser.ps1 starts the default Web browser
open-calculator.ps1 starts the calculator program
open-email-client.ps1 starts the default email client
open-file-explorer.ps1 starts the File Explorer
open-netflix.ps1 starts the Netflix app
open-onedrive.ps1 opens the user's OneDrive folder
open-recycle-bin.ps1 starts the File Explorer with the recycle bin folder
set-wallpaper.ps1 sets the given image as wallpaper
take-screenshot.ps1 takes a single screenshot
take-screenshots.ps1 takes multiple screenshots (every minute by default)

📁 Scripts for Files & Folders

Script Description Manual
cd-desktop.ps1 go to the user's desktop folder
cd-docs.ps1 go to the user's documents folder
cd-downloads.ps1 go to the user's downloads folder
cd-dropbox.ps1 go to the user's Dropbox folder
cd-home.ps1 go to the user's home folder
cd-music.ps1 go to the user's music folder
cd-onedrive.ps1 go to the user's OneDrive folder
cd-pics.ps1 go to the user's pictures folder
cd-recycle-bin.ps1 go to the user's recycle bin folder
cd-repos.ps1 go to the user's Git repositories folder
cd-root.ps1 go to the root directory (C:\ on Windows)
cd-scripts.ps1 go to the PowerShell Scripts folder
cd-up.ps1 go one directory level up
cd-up2.ps1 go two directory levels up
cd-up3.ps1 go three directory levels up
cd-up4.ps1 go four directory levels up
cd-videos.ps1 go to the user's videos folder
check-symlinks.ps1 checks every symlink in the given directory tree
check-xml-file.ps1 checks the given XML file for validity
clear-recycle-bin.ps1 removes the content of the recycle bin folder (can not be undo!)
copy-photos-sorted.ps1 copies all photos sorted by year and month
create-shortcut.ps1 creates a shortcut
create-symlink.ps1 creates a symbolic link
decrypt-file.ps1 encrypts the given file
download-dir.ps1 downloads a directory tree from the given URL
download-file.ps1 downloads a file from the given URL
edit.ps1 edits the given file with the built-in text editor
encrypt-file.ps1 encrypts the given file
inspect-exe.ps1 prints basic information of the given executable file
list-dir.ps1 lists the directory content (formatted in columns)
list-dir-tree.ps1 lists the directory tree content
list-empty-dirs.ps1 lists empty subfolders within the given directory tree
list-empty-files.ps1 lists empty files within the given directory tree
list-files.ps1 lists all files in the given folder and also in every subfolder
list-hidden-files.ps1 lists hidden files within the given directory tree
list-recycle-bin.ps1 lists the content of the recycle bin folder
list-unused-files.ps1 lists unused files in a directory tree
list-workdir.ps1 lists the current working directory
make-install.ps1 installs built executables and libs to the installation directory
MD5.ps1 prints the MD5 checksum of the given file
publish-to-ipfs.ps1 publishes the given files or directory to IPFS
remove-empty-dirs.ps1 removes empty subfolders within the given directory tree
search-filename.ps1 searches the directory tree for filenames by given pattern
search-files.ps1 searches the given pattern in the given files
SHA1.ps1 prints the SHA1 checksum of the given file
SHA256.ps1 prints the SHA256 checksum of the given file
upload-file.ps1 uploads the local file to the given FTP server
zip-dir.ps1 creates a .zip archive of the given directory

♻️ Scripts to Convert Files

Script Description Manual
convert-csv2txt.ps1 converts a given .CSV file to a text file Manual
convert-mysql2csv.ps1 converts a MySQL database table to a .CSV file Manual
convert-ps2bat.ps1 converts a PowerShell script to a .BAT file Manual
convert-ps2md.ps1 converts the comment-based help of a PowerShell script to Markdown Manual
convert-sql2csv.ps1 converts a SQL database table to a .CSV file Manual
convert-txt2wav.ps1 converts a text file to a .WAV audio file Manual

📝 Scripts for Git

Script Description Manual
cherry-picker.ps1 cherry-picks a Git commit into multiple branches Manual
clean-repo.ps1 cleans a Git repository from untracked files (including submodules) Manual
clean-repos.ps1 cleans all Git repositories under a directory from untracked files (including submodules) Manual
clone-repos.ps1 clones well-known Git repositories Manual
configure-git.ps1 sets up the Git user configuration Manual
create-branch.ps1 creates a new branch in a Git repository Manual
create-tag.ps1 creates a new tag in a Git repository Manual
fetch-repo.ps1 fetches updates for a Git repository (including submodules) Manual
fetch-repos.ps1 fetches updates for all Git repositories under a directory (including submodules) Manual
list-branches.ps1 lists all branches in a Git repository Manual
list-commits.ps1 lists all commits in a Git repository Manual
list-latest-tag.ps1 lists the latest tag on the current branch in a Git repository Manual
list-latest-tags.ps1 lists the latests tags in all Git repositories under a directory Manual
list-submodules.ps1 lists the submodules in a Git repository Manual
list-tags.ps1 lists all tags in a Git repository Manual
make-repo.ps1 builds a Git repository Manual
make-repos.ps1 builds all Git repositories under a directory Manual
pull-repo.ps1 pulls updates for a Git repository (including submodules) Manual
pull-repos.ps1 pulls updates for all Git repositories under a directory (including submodules) Manual
switch-branch.ps1 switches the branch in a Git repository (including submodules) Manual
sync-repo.ps1 synchronizes a Git repository by push & pull (including submodules) Manual

🔎 Scripts for PowerShell

Script Description Manual
daily-tasks.sh execute PowerShell scripts automatically as daily tasks (Linux only) Manual
introduce-powershell.ps1 introduces PowerShell to new users Manual
list-aliases.ps1 lists all PowerShell aliases Manual
list-automatic-variables.ps1 lists the automatic variables of PowerShell Manual
list-cheat-sheet.ps1 lists the PowerShell cheat sheet Manual
list-cmdlets.ps1 lists the PowerShell cmdlets Manual
list-console-colors.ps1 lists all console colors Manual
list-modules.ps1 lists the PowerShell modules Manual
list-profiles.ps1 lists your PowerShell profiles Manual
list-scripts.ps1 lists all PowerShell scripts in this repository Manual
set-profile.ps1 updates your PowerShell user profile Manual
template.ps1 copy this template PowerShell script to write a new one Manual

🛒 Various PowerShell Scripts

Feedback

Send your email feedback to: markus [at] fleschutz [dot] de

This open source release is licensed under the CC0 license. All trademarks are the property of their respective owners.