500+ PowerShell scripts (.ps1) for every system!
Go to file
2021-08-30 11:37:36 +02:00
Data Add list-print-jobs.ps1 2021-08-30 11:37:36 +02:00
Docs Update FAQ.md 2021-08-30 10:34:53 +02:00
Scripts Add list-print-jobs.ps1 2021-08-30 11:37:36 +02:00
LICENSE Initial commit 2020-04-30 17:49:27 +02:00
README.md Add list-print-jobs.ps1 2021-08-30 11:37:36 +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 Help
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 Help
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-print-jobs.ps1 Lists all jobs of all printers
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)
remove-print-jobs.ps1 Removes all jobs from all printers
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 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
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 Help
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 Help
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 Help
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.