PowerShell/README.md

44 lines
2.3 KiB
Markdown
Raw Normal View History

2020-06-15 14:36:14 +02:00
Collection of Useful PowerShell Scripts
=======================================
2020-05-01 11:44:56 +02:00
2020-04-30 17:59:12 +02:00
Useful cross-platform PowerShell scripts, to be used on the command-line (CLI) or by automation software like Jenkins.
2020-05-01 11:44:56 +02:00
2020-06-15 14:39:39 +02:00
Scripts Explained
-----------------
2020-06-15 14:36:14 +02:00
* **SHA256.ps1** - prints the SHA256 checksum of the given file
2020-05-25 17:48:09 +02:00
* **password.ps1** - generates and prints a single new password
* **passwords.ps1** - generates and prints a list of new passwords
* **poweroff.ps1** - halts the local computer, administrator rights might be needed
2020-06-11 18:23:54 +02:00
* **train_dns_cache.ps1** - trains the DNS cache with frequently used domain names
2020-05-25 17:48:09 +02:00
* **reboot.ps1** - reboots the local computer, administrator rights might be needed
* **speak.ps1** - speaks the given text
2020-06-15 14:50:53 +02:00
* **test.ps1** - simple test script
2020-05-25 17:48:09 +02:00
* **translate.ps1** - translates the given text
* **txt2wav.ps1** - converts text into a audio .WAV file
* **wakeup.ps1** - sends a magic packet to the given computer, waking him up
2020-05-22 09:54:16 +02:00
2020-05-01 11:44:56 +02:00
What is PowerShell?
-------------------
2020-05-04 14:39:06 +02:00
PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.
2020-05-01 11:44:56 +02:00
* PowerShell is cross-platform: available for Windows, Linux and Mac OS
* PowerShell is powerful: fully control your computer
2020-05-04 14:27:48 +02:00
* PowerShell is open-source: see the repository at https://github.com/PowerShell/PowerShell
* PowerShell is easy to learn: see the tutorial at https://www.guru99.com/powershell-tutorial.html
2020-05-04 14:39:06 +02:00
* PowerShell is fully documented: see the official docs at https://docs.microsoft.com/en-us/powershell/
2020-05-01 11:44:56 +02:00
2020-05-25 20:37:47 +02:00
Add Subfolder Scripts/ to the Search Path for Command-line Usage
----------------------------------------------------------------
2020-05-25 20:55:16 +02:00
* **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"
2020-05-25 20:37:47 +02:00
2020-05-01 12:09:03 +02:00
Script Standards
----------------
Each script provides:
2020-05-04 14:27:48 +02:00
1. a comment header containing a description, author, source, and license
2020-05-04 14:42:33 +02:00
2. prefers command-line options but may ask the user if missing
2020-05-04 14:27:48 +02:00
3. exits 0 for success, otherwise the error code (mostly 1)
2020-05-02 13:01:03 +02:00
License & Copyright
-------------------
This open source release is licensed under the CC0 license. All trademarks are the property of their respective owners.