Install PowerShell on Debian/Ubuntu
#Powershell #Linux #Debian
Full steps can be found at https://i12bretro.github.io/tutorials/0698.html
--------------------------------------------------------------------
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 Windows, Linux, and macOS. - https://docs.microsoft.com/en-us/powershell/scripting/overview
01. Log into the Linux device
02. Run the following commands in a terminal window
# update software repositories
sudo apt update
# install available software updates
sudo apt upgrade -y
# lookup latest release URL
regex='"browser_download_url": "(https:\/\/github.com\/PowerShell\/PowerShell\/releases\/download\/[^/]*\/powershell_[^/]*.deb_amd64\.deb)"' && response=$(curl -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/PowerShell/PowerShell/releases/latest) && [[ $response =~ $regex ]] && downloadURL="${BASH_REMATCH[1]}"
# download powershell
wget -O ./powershell.deb $downloadURL
# install powershell
sudo dpkg -i ./powershell.deb
# run powershell
pwsh
Source: https://docs.microsoft.com/en-us/powershell/scripting/install/install-debian
### Connect with me and others ###
★ Discord: https://discord.com/invite/EzenvmSHW8
★ Reddit: https://reddit.com/r/i12bretro
★ Twitter: https://twitter.com/i12bretro