Mega Collection of PowerShell Scripts

0

Mega collection of 500+ useful cross-platform PowerShell scripts (.ps1).

Miscellaneous

powershell
scripts
collection
cross-platform

Mega Collection of PowerShell Scripts

Contains 500+ free and stand-alone PowerShell scripts for Linux, Mac OS, and Windows. Useful on the command-line (CLI), for remote control via SSH, for automation (on startup/login/logoff/daily/hourly/shutdown or via AutoHotkey/Jenkins/etc.), for context menus, for voice commands (see talk2windows), or simply to learn PowerShell. All scripts are located in the ๐Ÿ“‚scripts subfolder and support Unicode - a modern console like Windows Terminal is recommended.

Download | PowerShell FAQ | PowerShell Cheat Sheet | PowerShell Documentation

๐Ÿ”Š Scripts for Audio & Voice

ScriptDescription
list-voices.ps1Lists the installed text-to-speech voices. Read more ยป
play-beep-sound.ps1Plays a short beep sound. More ยป
play-files.ps1Plays the given audio files. More ยป
play-happy-birthday.ps1Plays the Happy Birthday song. More ยป
play-imperial-march.ps1Plays the Imperial March (Star Wars). More ยป
play-jingle-bells.ps1Plays Jingle Bells. More ยป
play-mission-impossible.ps1Plays the Mission Impossible theme. More ยป
play-m3u.ps1Plays the given M3U playlist. More ยป
play-mp3.ps1Plays the given MP3 sound file. More ยป
play-super-mario.ps1Plays the Super Mario intro. More ยป
play-tetris-melody.ps1Plays the Tetris melody. More ยป
speak-checklist.ps1Speaks the given checklist by text-to-speech. More ยป
speak-countdown.ps1Speaks a countdown by text-to-speech. More ยป
speak-english.ps1Speaks text with an English text-to-speech voice. More ยป
speak-epub.ps1Speaks the content of the given Epub file by text-to-speech. More ยป
speak-file.ps1Speaks the content of the given text file by text-to-speech. More ยป
speak-french.ps1Speaks text with a French text-to-speech voice. More ยป
speak-german.ps1Speaks text with a German text-to-speech voice. More ยป
speak-italian.ps1Speaks text with an Italian text-to-speech voice. More ยป
speak-spanish.ps1Speaks text with a Spanish text-to-speech voice. More ยป
speak-test.ps1Performs a speak test by text-to-speech. More ยป
speak-text.ps1Speaks the given text by text-to-speech. More ยป
spell-word.ps1Spells the given word by text-to-speech. More ยป
tell-joke.ps1Tells a random joke by text-to-speech. More ยป
tell-quote.ps1Tells a random quote by text-to-speech. More ยป
turn-volume-down.ps1Turns the audio volume down. More ยป
turn-volume-fully-up.ps1Turns the audio fully up. More ยป
turn-volume-off.ps1Turns audio off. More ยป
turn-volume-on.ps1Turns audio on. More ยป
turn-volume-up.ps1Turns the audio volume up. More ยป

โš™๏ธ Scripts for Computer Management

ScriptDescription
add-firewall-rules.ps1Adds firewall rules for executables, needs admin rights. Read more ยป
check-cpu.ps1Checks the CPU temperature. More ยป
check-dns.ps1Checks the DNS resolution. More ยป
check-drive-space.ps1Checks a drive for free space left. More ยป
check-file-system.ps1Checks the file system of a drive (needs admin rights). More ยป
check-health.ps1Checks the system health. More ยป
check-ping.ps1Checks the ping latency to the internet. More ยป
check-swap-space.ps1Checks the swap space for free space left. More ยป
check-windows-system-files.ps1Checks Windows system files (needs admin rights). More ยป
enable-crash-dumps.ps1Enables the writing of crash dumps. More ยป
hibernate.ps1Hibernates the local computer immediately. More ยป
install-github-cli.ps1Installs GitHub CLI. More ยป
install-chrome-browser.ps1Installs the Google Chrome browser. More ยป
install-firefox.ps1Installs the Firefox browser. More ยป
install-knot-resolver.ps1Installs the Knot Resolver (needs admin rights). More ยป
install-salesforce-cli.ps1Installs the Salesforce CLI (sfdx). More ยป
install-ssh-client.ps1Installs a SSH client (needs admin rights). More ยป
install-ssh-server.ps1Installs a SSH server (needs admin rights). More ยป
install-signal-cli.ps1Installs the CLI edition of the Signal messenger. More ยป
install-updates.ps1Installs updates (need admin rights). More ยป
install-wsl.ps1Installs Windows Subsystem for Linux (WSL), needs admin rights. More ยป
list-apps.ps1Lists the installed applications. More ยป
list-cli-tools.ps1Lists installed command-line interface (CLI) tools. More ยป
list-dns-servers.ps1Lists public DNS servers. More ยป
list-drives.ps1Lists all drives. More ยป
list-network-shares.ps1Lists all network shares of the local computer. More ยป
list-installed-software.ps1Lists the installed software. More ยป
list-printers.ps1Lists all printer known to the computer. More ยป
list-print-jobs.ps1Lists all jobs of all printers. More ยป
list-processes.ps1Lists the local computer processes. More ยป
list-services.ps1Lists the services on the local computer. More ยป
list-system-info.ps1Lists system information on the local computer. More ยป
list-tasks.ps1Lists all Windows scheduler tasks. More ยป
list-timezone.ps1Lists the current time zone details. More ยป
list-timezones.ps1Lists all time zones available. More ยป
list-user-groups.ps1Lists the user groups on the local computer. More ยป
new-power-plan.ps1Creates a custom power plan based on the active one. More ยป
poweroff.ps1Halts the local computer (needs admin rights). More ยป
query-smart-data.ps1Queries the S.M.A.R.T. data of your HDD/SSD's. More ยป
reboot.ps1Reboots the local computer (needs admin rights). More ยป
remove-print-jobs.ps1Removes all jobs from all printers. More ยป
restart-network-adapters.ps1Restarts all local network adapters. More ยป
upgrade-ubuntu.ps1Upgrades Ubuntu Linux to the latest (LTS) release. More ยป
wake-up-host.ps1Wakes up a computer using Wake-on-LAN. More ยป
windefender.ps1Turn Windows Defender on/off/check real time monitoring. More ยป

๐Ÿ’ป Scripts for the Desktop

ScriptDescription
close-calculator.ps1Closes the calculator application. Read more ยป
close-cortana.ps1Closes Cortana. More ยป
close-chrome.ps1Closes the Google Chrome browser. More ยป
close-program.ps1Closes the given program gracefully. More ยป
close-edge.ps1Closes the Edge browser. More ยป
close-file-explorer.ps1Closes Microsoft File Explorer. More ยป
close-firefox.ps1Closes the Firefox browser. More ยป
close-microsoft-store.ps1Closes the Microsoft Store app. More ยป
close-netflix.ps1Closes the Netflix app. More ยป
close-onedrive.ps1Closes Microsoft OneDrive. More ยป
close-serenade.ps1Closes the Serenade application. More ยป
close-snipping-tool.ps1Closes the Snipping Tool application. More ยป
close-spotify.ps1Closes Spotify. More ยป
close-system-settings.ps1Closes the System Settings window. More ยป
close-task-manager.ps1Closes the Task Manager. More ยป
close-thunderbird.ps1Closes Mozilla Thunderbird. More ยป
close-vlc.ps1Closes the VLC media player application. More ยป
close-windows-terminal.ps1Closes the Windows Terminal application. More ยป
enable-god-mode.ps1Enables the god mode (adds a new icon to the desktop). More ยป
install-chrome.ps1Installs the Google Chrome browser. Read more...
install-firefox.ps1Installs the Firefox browser. Read more...
list-clipboard.ps1Lists the contents of the clipboard. Read more...
new-email.ps1Starts the default email client to write a new email. Read more...
open-amazon-website.ps1Opens Amazon's website. Read more...
open-default-browser.ps1Launches the default Web browser. Read more...
open-calculator.ps1Starts the calculator program. Read more...
open-c-drive.ps1Opens the C: drive folder. Read more...
open-downloads-folders.ps1Opens the user's downloads folder. Read more...
open-dropbox-folder.ps1Opens the user's Dropbox folder. Read more...
open-edge.ps1Launches the Edge browser. Read more...
open-email-client.ps1Starts the default email client. Read more...
open-facebook-website.ps1Opens Facebook's website. Read more...
open-file-explorer.ps1Opens the File Explorer. Read more...
open-firefox.ps1Launches the Firefox browser. Read more...
open-fritz-box.ps1Opens FRITZ!Box's web interface. Read more...
open-github.ps1Opens GitHub's website. Read more...
open-google-contacts.ps1Opens Google Contacts. Read more...
open-google-earth.ps1Opens Google Earth. Read more...
open-google-mail.ps1Opens Google Mail. Read more...
open-google-maps.ps1Opens Google Maps. Read more...
open-google-news.ps1Opens Google News. Read more...
open-google-play.ps1Opens Google Play. Read more...
open-google-search.ps1Opens Google Search. Read more...
open-google-translate.ps1Opens Google Translate. Read more...
open-home-folder.ps1Opens the user's home folder. Read more...
open-music-folder.ps1Opens the user's music folder. Read more...
open-netflix.ps1Starts the Netflix app. Read more...
open-microsoft-store.ps1Launches the Microsoft Store app. Read more...
open-notepad.ps1Starts the Notepad app. Read more...
open-onedrive-folder.ps1Opens the user's OneDrive folder. Read more...
open-pictures-folder.ps1Opens the user's pictures folder. Read more...
open-recycle-bin.ps1Opens the user's recycle bin folder. Read more...
open-repos-folder.ps1Opens the user's Git repositories folder. Read more...
open-snipping-tool.ps1Starts the Snipping Tool. Read more...
open-speed-test.ps1Opens Cloudflare's speed test. Read more...
open-spotify.ps1Opens Spotify. Read more...
open-system-settings.ps1Opens the system settings of Windows. Read more...
open-task-manager.ps1Starts the Task Manager. Read more...
open-videos-folder.ps1Opens the user's videos folder. Read more...
open-windows-terminal.ps1Launches Windows Terminal. Read more...
open-wikipedia-website.ps1Opens Wikipedia's website. Read more...
open-youtube-website.ps1Opens YouTube's website. Read more...
remind-me.ps1Creates a scheduled task that will display a popup message. Read more...
save-screenshot.ps1Saves a single screenshot. Read more...
set-wallpaper.ps1Sets the given image as wallpaper. Read more...

๐Ÿ“ Scripts for Files & Folders

ScriptDescription
cd-autostart.ps1Set the working directory to the user's autostart folder. Read more ยป
cd-desktop.ps1Set the working directory to the user's desktop folder. More ยป
cd-docs.ps1Set the working directory to the user's documents folder. More ยป
cd-downloads.ps1Set the working directory to the user's downloads folder. More ยป
cd-dropbox.ps1Set the working directory to the user's Dropbox folder. More ยป
cd-home.ps1Set the working directory to the user's home folder. More ยป
cd-music.ps1Set the working directory to the user's music folder. Read more...
cd-onedrive.ps1Set the working directory to the user's OneDrive folder. Read more...
cd-pics.ps1Set the working directory to the user's pictures folder. Read more...
cd-recycle-bin.ps1Set the working directory to the user's recycle bin folder. Read more...
cd-repos.ps1Change the working directory to the user's Git repositories folder. Read more...
cd-repo.ps1Change the working directory to the given Git repository folder. Read more...
cd-root.ps1Set the working directory to the root directory. Read more...
cd-scripts.ps1Set the working directory to the PowerShell Scripts folder. Read more...
cd-ssh.ps1Set the working directory to the user's SSH folder. Read more...
cd-up.ps1Set the working directory to one directory level up. Read more...
cd-up2.ps1Set the working directory to two directory levels up. Read more...
cd-up3.ps1Set the working directory to three directory levels up. Read more...
cd-up4.ps1Set the working directory to four directory levels up. Read more...
cd-videos.ps1Set the working directory to the user's videos folder. Read more...
check-symlinks.ps1Checks every symlink in a directory tree. Read more...
check-xml-file.ps1Checks the given XML file for validity. Read more...
clear-recycle-bin.ps1Removes the content of the recycle bin folder (can not be undo!). Read more...
copy-photos-sorted.ps1Copy image files sorted by year and month. Read more...
decrypt-file.ps1Decrypts the given file. Read more...
download-dir.ps1Downloads a directory tree from the given URL. Read more...
download-file.ps1Downloads a file from the given URL. Read more...
edit.ps1Edits the given file with the built-in text editor. Read more...
encrypt-file.ps1Encrypts the given file. Read more...
get-md5.ps1Prints the MD5 checksum of the given file. Read more...
get-sha1.ps1Prints the SHA1 checksum of the given file. Read more...
get-sha256.ps1Prints the SHA256 checksum of the given file. Read more...
inspect-exe.ps1Prints basic information of the given executable file. Read more...
install-fonts.ps1installs fonts and updates the registry. Read more...
list-dir-tree.ps1Lists the directory tree content. Read more...
list-empty-dirs.ps1Lists empty subfolders within the given directory tree. Read more...
list-empty-files.ps1Lists empty files within the given directory tree. Read more...
list-files.ps1Lists all files in the given folder and also in every subfolder. Read more...
list-folder.ps1Lists the folder content. Read more...
list-hidden-files.ps1Lists hidden files within the given directory tree. Read more...
list-recycle-bin.ps1Lists the content of the recycle bin folder. Read more...
list-unused-files.ps1Lists unused files in a directory tree. Read more...
list-workdir.ps1Lists the current working directory. Read more...
make-install.ps1Installs built executables and libs to the installation directory. Read more...
new-shortcut.ps1Creates a new shortcut file. Read more...
new-symlink.ps1Creates a new symbolic link file. Read more...
new-zipfile.ps1Creates a new .zip file from a directory. Read more...
publish-to-ipfs.ps1Publishes the given files or directory to IPFS. Read more...
remove-empty-dirs.ps1Removes empty subfolders within the given directory tree. Read more...
replace-in-files.ps1Search and replace a pattern in the given files by the replacement. Read more...
search-filename.ps1Searches the directory tree for filenames by given pattern. Read more...
search-files.ps1Searches the given pattern in the given files. Read more...
upload-file.ps1Uploads the local file to the given FTP server. Read more...

โ™ป๏ธ Scripts to Convert Files

ScriptDescription
convert-csv2txt.ps1Converts a .CSV file to a text file. Read more ยป
convert-dir27z.ps1Converts a directory tree to a compressed .7z file. Read more ยป
convert-dir2zip.ps1Converts a directory tree to a compressed .ZIP file. Read more ยป
convert-history2ps1.ps1Converts your command history to a PowerShell script. Read more ยป
convert-image2ascii.ps1Converts images to ASCII art. Read more ยป
convert-images2webp.ps1Converts images in a directory or a single image file to WebP format in parallel. More ยป
convert-mysql2csv.ps1Converts a MySQL database table to a .CSV file. More ยป
convert-ps2bat.ps1Converts a PowerShell script to a Batch script. More ยป
convert-ps2md.ps1Converts the comment-based help of a PowerShell script to Markdown. More ยป
convert-md2docx.ps1Converts Markdown file(s) to .DOCX format. Read more ยป
convert-md2html.ps1Converts Markdown file(s) to HTML format. Read more ยป
convert-md2pdf.ps1Converts Markdown file(s) to PDF format. Read more ยป
convert-sql2csv.ps1Converts a SQL database table to a .CSV file. More ยป
convert-txt2wav.ps1Converts text to a .WAV audio file. More ยป
export-to-manuals.ps1Exports all scripts as manuals. More ยป

๐Ÿ“ Scripts for Git

ScriptDescription
build-repo.ps1Builds a Git repository. Read more ยป
build-repos.ps1Builds all Git repositories in a folder. More ยป
check-repo.ps1Checks a Git repository. More ยป
clean-repo.ps1Cleans a Git repository from untracked files. More ยป
clean-repos.ps1Cleans all Git repositories in a folder from untracked files. More ยป
clone-repos.ps1Clones well-known Git repositories. More ยป
configure-git.ps1Sets up the Git user configuration. More ยป
fetch-repo.ps1Fetches updates for a Git repository. More ยป
fetch-repos.ps1Fetches updates for all Git repositories in a folder. More ยป
list-branches.ps1Lists all branches in a Git repository. More ยป
list-commit-stats.ps1Lists a Git commit statistics. More ยป
list-commits.ps1Lists all commits in a Git repository. More ยป
list-latest-tag.ps1Lists the latest tag on the current branch in a Git repository. More ยป
list-latest-tags.ps1Lists the latests tags in all Git repositories under a directory. More ยป
list-repos.ps1Lists all Git repositories in a folder. More ยป
list-submodules.ps1Lists all submodules in a Git repository. More ยป
list-tags.ps1Lists all tags in a Git repository. More ยป
new-branch.ps1Creates a new branch in a Git repository. More ยป
new-tag.ps1Creates a new tag in a Git repository. More ยป
pick-commit.ps1Cherry-picks a Git commit into multiple branches. More ยป
pull-repo.ps1Pulls updates into a Git repository. More ยป
pull-repos.ps1Pulls updates into all Git repositories in a folder. More ยป
remove-tag.ps1Removes a tag in a Git repository. More ยป
switch-branch.ps1Switches the branch in a Git repository. More ยป
sync-repo.ps1Synchronizes a Git repository by pull & push. More ยป
write-changelog.ps1Writes a changelog from Git commits. More ยป

๐Ÿ”Ž Scripts for PowerShell

ScriptDescription
daily-tasks.shExecute PowerShell scripts automatically as daily tasks (Linux only). Read more ยป
introduce-powershell.ps1Introduces PowerShell to new users. More ยป
list-aliases.ps1Lists all PowerShell aliases. More ยป
list-automatic-variables.ps1Lists the automatic variables of PowerShell. More ยป
list-cheat-sheet.ps1Lists the PowerShell cheat sheet. More ยป
list-cmdlets.ps1Lists the PowerShell cmdlets. More ยป
list-console-colors.ps1Lists all console colors. More ยป
list-modules.ps1Lists the PowerShell modules. More ยป
list-profiles.ps1Lists your PowerShell profiles. More ยป
list-scripts.ps1Lists all PowerShell scripts in this repository. More ยป
new-script.ps1Creates a new PowerShell script. More ยป
set-profile.ps1Updates your PowerShell user profile. More ยป

๐Ÿ›’ Various PowerShell Scripts

ScriptDescription
add-memo.ps1Adds the given memo text to $HOME/Memos.csv. Read more ยป
check-ipv4-address.ps1Checks the given IPv4 address for validity. More ยป
check-ipv6-address.ps1Checks the given IPv6 address for validity. More ยป
check-mac-address.ps1Checks the given MAC address for validity. More ยป
check-subnet-mask.ps1Checks the given subnet mask for validity. More ยป
check-weather.ps1Checks the current weather for critical values. More ยป
display-time.ps1Displays the current time for 10 seconds by default. Read more...
list-anagrams.ps1Lists all anagrams of the given word. Read more...
list-city-weather.ps1Lists the current weather of cities worldwide (west to east). Read more...
list-countries.ps1Lists details of all countries. Read more...
list-credits.ps1Shows the credits. Read more...
list-crypto-rates.ps1Lists the current crypto exchange rates. Read more...
list-environment-variables.ps1Lists all environment variables. Read more...
list-emojis.ps1Lists the emojis of Unicode 13.0. Read more...
list-fritzbox-calls.ps1Lists the FRITZ!Box calls. Read more...
list-fritzbox-devices.ps1Lists FRITZ!Box's known devices. Read more...
list-earthquakes.ps1Lists earthquakes with magnitude >= 6.0 for the last 30 days. Read more...
list-exchange-rates.ps1Lists the current exchange rates for the given currency. Read more...
list-memos.ps1Lists the memos at $HOME/Memos.csv. Read more...
list-mysql-tables.ps1Lists the MySQL server tables. Read more...
list-news.ps1Lists the latest news. Read more...
list-os-releases.ps1Lists operating system releases and download URL. Read more...
list-os-updates.ps1Lists operating system updates. Read more...
list-passwords.ps1Prints a list of random passwords. Read more...
list-pins.ps1Prints a list of random PIN's. Read more...
list-sql-tables.ps1Lists the SQL server tables. Read more...
list-tiobe-index.ps1Lists the TIOBE index of top programming languages. Read more...
list-weather.ps1Lists the hourly weather. Read more...
locate-city.ps1Prints the geographic location of the given city. Read more...
locate-ipaddress.ps1Prints the geographic location of the given IP address. Read more...
locate-zip-code.ps1Prints the geographic location of the given zip-code. Read more...
moon.ps1Prints the current moon phase. Read more...
new-qrcode.ps1Generates a new QR code image file. Read more...
reboot-fritzbox.ps1Reboots the FRITZ!box device. Read more...
scan-ports.ps1Scans the network for open/closed ports. Read more...
send-email.ps1Sends an email message. Read more...
send-tcp.ps1Sends a TCP message to the given IP address and port. Read more...
send-udp.ps1Sends a UDP datagram message to the given IP address and port. Read more...
set-timer.ps1Sets a timer for a countdown. Read more...
simulate-presence.ps1Simulates the human presence against burglars. Read more...
start-calibre-server.ps1Starts a local Calibre server. Read more...
start-ipfs-server.ps1Starts a local IPFS server. Read more...
switch-shelly1.ps1Switches a Shelly1 device in the local network. Read more...
translate-file.ps1Translates the given text file into other languages. Read more...
translate-files.ps1Translates the given text files into any supported language. Read more...
translate-text.ps1Translates the given text in English into other languages. Read more...
weather.ps1Prints the current weather forecast. Read more...
weather-report.ps1Prints the local weather report. Read more...
what-is.ps1Prints a description of the given abbreviation. Read more...
write-animated.ps1Writes animated text. Read more...
write-big.ps1Writes the given text in big letters. Read more...
write-blue.ps1Writes the given text in a blue foreground color. Read more...
write-braille.ps1Writes the given text in Braille. Read more...
write-calendar.ps1Writes the calendar (month of year). Read more...
write-green.ps1Writes the given text in a green foreground color. Read more...
write-joke.ps1Writes a random Juck Norris joke. Read more...
write-lowercase.ps1Writes the given text in lowercase letters. Read more...
write-marquee.ps1Writes the given text as marquee. Read more...
write-morse-code.ps1Writes the given text in Morse code. Read more...
write-motd.ps1Writes the message of the day (MOTD). Read more...
write-quote.ps1Writes a random quote. Read more...
write-red.ps1Writes the given text in a red foreground color. Read more...
write-rot13.ps1Encodes or decodes the given text with ROT13. Read more...
write-typewriter.ps1Writes the given text with the typewriter effect. More ยป
write-uppercase.ps1Writes the given text in uppercase letters. More ยป
write-vertical.ps1Writes the given text in vertical direction. More ยป
show-notification-motivation-quote.ps1Show notification with random cat picture and motivation quote. More ยป

๐Ÿ“ง Feedback

Send your email feedback to: markus.fleschutz [at] gmail.com

๐Ÿค License & Copyright

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