PowerShell Core is a version of PowerShell that can be installed on Windows, Mac OS X (I covered it here) and Linux, i.e. Raspbian. For this blog post I am going to using my Raspberry Pi 4 and Raspbian (Buster).
“PowerShell is a task automation and configuration management framework from Microsoft, consisting of a command-line shell and associated scripting language.”
If you want to play with Microsoft Azure then you’ll want to take the PowerShell command line for a test drive as it can be better than the GUI driven web interface, and on Linux that means installing PowerShell Core.
First up, make sure to run sudo apt-get update.
Next up we use wget to download the archive file that contains PowerShell Core for Raspbian.
Note: Check https://github.com/PowerShell/PowerShell to check what the latest version is.
Once the archive file is download we need a location to extract it into.
mkdir makes a directory, ~/ places it at the root of the folder tree and in this case the folder will be called powershell.
tar -xvf ./powershell-6.2.0-linux-arm32.tar.gz -C ~/powershell
The tar -xvf command extracts (-x) the file (f) verbosely (v) and copies it to the ~/powershell folder.
With all that complete, it’s time to run PowerShell Core.
pswsh is PowerShell Core and it should now open.
To check which version is installed type:
With PowerShell Core installed and running the Azure module can be installed.