![](powershell_black_icon_64x64.png) PowerShell FAQ ===================================================
What is PowerShell? **PowerShell is a cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework. PowerShell runs on Linux, Mac OS, and Windows.**
Why use PowerShell? * **It's powerful** - fully control your computer. * **It's easy to learn** - see the tutorial at: https://www.guru99.com/powershell-tutorial.html. * **It's cross-platform** - available for Linux, Mac OS and Windows. * **It's open-source and free** - see the Github repository at: https://github.com/PowerShell/PowerShell. * **It's fully documented** - see the official documentation at: https://docs.microsoft.com/en-us/powershell.
How to learn PowerShell? * **Please find tutorials at:** https://www.guru99.com/powershell-tutorial.html * **See a cheat sheet at:** [PowerShell/Docs/cheat-sheet.md](cheat-sheet.md) * **Visit the official PowerShell documentation at:** https://docs.microsoft.com/en-us/powershell/
How to install PowerShell on Linux? 1. **Your Linux supports Snap packages? Then execute:** ``` $ sudo snap install PowerShell $ sudo ln -s /snap/bin/pwsh /usr/bin/pwsh ``` 2. **Otherwise, visit:** https://github.com/PowerShell/PowerShell **and scroll down to: *Get PowerShell*.** 3. **Want to set PowerShell as your default shell?** * Make sure the file **/etc/shells** (contains valid login shells) has a **/usr/bin/pwsh** line, otherwise add it. * Now execute: `chsh -s /usr/bin/pwsh ` (replace <USERNAME> by your user name). 4. **SSH login is too verbose?** * Just execute: `echo > ~/.hushlogin`
How to install PowerShell on MacOS? **Please visit:** https://github.com/PowerShell/PowerShell **and scroll down to: 'Get PowerShell'.**
How to install PowerShell on Windows? **It's already preinstalled, but** the script execution policy is *restricted* (forbidden) by default! **Open the *Windows PowerShell (Admin)* console and enter:** ``` > Set-ExecutionPolicy RemoteSigned -Scope CurrentUser ``` **NOTE:** the group policy object (GPO) settings of your organization might disallow changes. In that case contact your system administrator for help.
How to get the 500+ PowerShell sample scripts? 1. **When using Git, execute in a terminal window:** `git clone https://github.com/fleschutz/PowerShell` 2. **Otherwise, download and unzip it from:** https://github.com/fleschutz/PowerShell/archive/master.zip
How to execute PowerShell scripts on Windows? 1. **In the Windows desktop:** right-click the script and select: *Execute with PowerShell* 2. **On the command-line:** launch a terminal application (e.g. *Windows Terminal*), then type: `cd `, then: `./