500+ PowerShell scripts (.ps1) for every system!
Go to file
2020-10-03 21:32:24 +00:00
Scripts Added first line 2020-10-03 21:32:24 +00:00
LICENSE Initial commit 2020-04-30 17:49:27 +02:00
README.md Added screenshot.ps1 and screenshots.ps1 2020-10-03 21:26:33 +00:00

Collection of Useful PowerShell Scripts (CUPS)

Useful cross-platform PowerShell scripts, to be used on the command-line (CLI) or by automation software like Jenkins.

PowerShell Scripts Included

What is PowerShell?

PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.

How to get PowerShell?

Windows 7 and newer do provide PowerShell by default. It's recommended to use it via Windows Terminal (see the Microsoft Store at https://www.aka.ms/terminal).

For installation on alternative platforms (CentOS, Debian, Docker, Fedora, macOS, openSUSE, Red Hat, Ubuntu) visit https://github.com/PowerShell/PowerShell.

Afterward, install the scripts by clicking on the green "Code" button or execute:

$ git clone https://github.com/fleschutz/PowerShell

How to configure PowerShell as default shell on Linux?

Make sure PowerShell is installed, then use the chsh commmand as follows:

  • chsh -s /bin/powershell <username>

How to add the subfolder Scripts/ to the search path for command-line usage?

  • Windows: open the environment variables dialogue and add the full path to Scripts/ to the system environment variable "Path"
  • Bash or sh: edit .profile in your home directory and add the line: PATH="$PATH:/path/to/PowerShell/Scripts"

Script Standards

Each script supports the following:

  1. a metadata header containing the syntax, description, author, source, and license
  2. prefers command-line options but may ask the user in case no option is given
  3. encoding in UTF-8 with BOM to support Unicode characters
  4. exits 0 for success, otherwise the error code (mostly 1)

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.