500+ PowerShell scripts (.ps1) for every system!
Go to file
2021-09-01 09:23:25 +02:00
Data Fix typo 2021-08-30 16:14:39 +02:00
Docs Update manuals 2021-08-30 15:51:59 +02:00
Scripts Improve output of publish-to-ipfs.ps1 2021-09-01 09:23:25 +02:00
LICENSE Initial commit 2020-04-30 17:49:27 +02:00
README.md Update README.md 2021-08-31 10:17:39 +02:00

Mega Collection of PowerShell Scripts

This repository provides more than 250 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 Help
mute-audio.ps1 Mutes the audio device Help
list-voices.ps1 Lists the installed text-to-speech (TTS) voices Help
play-beep.ps1 Plays a beep sound Help
play-files.ps1 Plays the given audio files Help
play-happy-birthday.ps1 Plays the Happy Birthday song Help
play-imperial-march.ps1 Plays the Imperial March (Star Wars) Help
play-jingle-bells.ps1 Plays Jingle Bells Help
play-mission-impossible.ps1 Plays the Mission Impossible theme Help
play-m3u.ps1 Plays the given playlist (M3U file format) Help
play-mp3.ps1 Plays the given sound file (MP3 file format) Help
play-super-mario.ps1 Plays the Super Mario Intro Help
play-tetris-melody.ps1 Plays the Tetris melody Help
speak-checklist.ps1 Speaks the given checklist by text-to-speech (TTS) Help
speak-countdown.ps1 Starts a countdown by text-to-speech (TTS) Help
speak-date.ps1 Speaks the current date by text-to-speech (TTS) Help
speak-english.ps1 Speaks the given text with an English text-to-speech (TTS) voice Help
speak-epub.ps1 Speaks the content of the given Epub file by text-to-speech (TTS) Help
speak-file.ps1 Speaks the content of the given text file by text-to-speech (TTS) Help
speak-french.ps1 Speaks the given text with a French text-to-speech (TTS) voice Help
speak-german.ps1 Speaks the given text with a German text-to-speech (TTS) voice Help
speak-italian.ps1 Speaks the given text with an Italian text-to-speech (TTS) voice Help
speak-joke.ps1 Speaks a random Chuck Norris joke by text-to-speech (TTS) Help
speak-quote.ps1 Speaks a random quote by text-to-speech (TTS) Help
speak-spanish.ps1 Speaks the given text with a Spanish text-to-speech (TTS) voice Help
speak-test.ps1 Performs a speak test by text-to-speech (TTS) Help
speak-text.ps1 Speaks the given text by text-to-speech (TTS) Help
speak-time.ps1 Speaks the current time by text-to-speech (TTS) Help
turn-volume-up.ps1 Turns the audio volume up (+10% by default) Help
turn-volume-down.ps1 Turns the audio volume down (-10% by default) Help
unmute-audio.ps1 Unmutes the audio device Help
voice-control.ps1 Executes the PowerShell scripts by voice Help

⚙️ Scripts to Manage Computers

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

💻 Scripts for the Desktop

Script Description Help
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 Help
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
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
new-shortcut.ps1 Creates a new shortcut
new-symlink.ps1 Creates a new symbolic link
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 Help
convert-csv2txt.ps1 Converts a given .CSV file to a text file Help
convert-mysql2csv.ps1 Converts a MySQL database table to a .CSV file Help
convert-ps2bat.ps1 Converts a PowerShell script to a .BAT file Help
convert-ps2md.ps1 Converts the comment-based help of a PowerShell script to Markdown Help
convert-sql2csv.ps1 Converts a SQL database table to a .CSV file Help
convert-txt2wav.ps1 Converts a text file to a .WAV audio file Help

📝 Scripts for Git

Script Description Help
cherry-picker.ps1 Cherry-picks a Git commit into multiple branches Help
clean-repo.ps1 Cleans a Git repository from untracked files (including submodules) Help
clean-repos.ps1 Cleans all Git repositories under a directory from untracked files (including submodules) Help
clone-repos.ps1 Clones well-known Git repositories Help
configure-git.ps1 Sets up the Git user configuration Help
fetch-repo.ps1 Fetches updates for a Git repository (including submodules) Help
fetch-repos.ps1 Fetches updates for all Git repositories under a directory (including submodules) Help
list-branches.ps1 Lists all branches in a Git repository Help
list-commits.ps1 Lists all commits in a Git repository Help
list-latest-tag.ps1 Lists the latest tag on the current branch in a Git repository Help
list-latest-tags.ps1 Lists the latests tags in all Git repositories under a directory Help
list-submodules.ps1 Lists the submodules in a Git repository Help
list-tags.ps1 Lists all tags in a Git repository Help
make-repo.ps1 Builds a Git repository Help
make-repos.ps1 Builds all Git repositories under a directory Help
new-branch.ps1 Creates a new branch in a Git repository Help
new-tag.ps1 Creates a new tag in a Git repository Help
pull-repo.ps1 Pulls updates for a Git repository (including submodules) Help
pull-repos.ps1 Pulls updates for all Git repositories under a directory (including submodules) Help
switch-branch.ps1 Switches the branch in a Git repository (including submodules) Help
sync-repo.ps1 Synchronizes a Git repository by push & pull (including submodules) Help

🔎 Scripts for PowerShell

Script Description Help
daily-tasks.sh Execute PowerShell scripts automatically as daily tasks (Linux only) Help
introduce-powershell.ps1 Introduces PowerShell to new users Help
list-aliases.ps1 Lists all PowerShell aliases Help
list-automatic-variables.ps1 Lists the automatic variables of PowerShell Help
list-cheat-sheet.ps1 Lists the PowerShell cheat sheet Help
list-cmdlets.ps1 Lists the PowerShell cmdlets Help
list-console-colors.ps1 Lists all console colors Help
list-modules.ps1 Lists the PowerShell modules Help
list-profiles.ps1 Lists your PowerShell profiles Help
list-scripts.ps1 Lists all PowerShell scripts in this repository Help
new-script.ps1 Creates a new PowerShell script Help
set-profile.ps1 Updates your PowerShell user profile Help

🛒 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.