Recently i had to install Powershell on my Ubuntu servers in order to run some ansible playbook on vCenter.
I am using on Ubuntu 18.04, which by default Powershell modules not part of server and we have to use the following command in order to be able use powershell commands:
sudo update update && sudo apt -y install wget wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb sudo dpkg -i packages-microsoft-prod.deb
sudo apt update sudo apt -y install powershell
Then run:
pwsh
And you can see that Powershell is installed: