Installation (PowerShell Core)
Allows you to run PowerShell Core from a Linux host or AWS Lambda .NET Core 2.1 runtime. Note that it is a significantly cut down environment from what you'd expect when running within a Windows OS. Part of the power of PowerShell is that it makes anything that's exposed through .NET available to PowerShell, but where this is dependant on Windows libraries, then its obviously not going to be available in Core (cryptography for example).
Procedure
These instructions are for Ubuntu 16.04 LTS, but can be adapted for other versions as indicated, for other distributions see https://docs.microsoft.com/en-us/powershell/scripting/setup/installing-powershell-core-on-linux?view=powershell-6 for further info. The procedure below has been tested on both Ubuntu 14.04 and 16.04.
- Register Microsoft repository GPG key
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
- Add the Microsoft repository to aptitude sources (change the MS URL to fix your OS version)
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
- Update list of available packages
apt update
- Install PowerShell Core
apt install powershell
- Launch PowerShell
pwsh