PowerShell on Linux

This article will present the required steps to install powershell on Linux.

Objective

The objective is to operate from Linux Windows Azure Pack.

Procedure

  • Import the public repository GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | sudo apt-key add -
  • Register the Microsoft Ubuntu repository
curl https://packages.microsoft.com/config/ubuntu/16.04/prod.list | sudo tee /etc/apt/sources.list.d/microsoft.list
  • Update the list of products
sudo apt-get update
  • Install PowerShell
sudo apt-get install -y powershell
  • Start PowerShell
powershell

Add Azure module

Install Azure module in powershell running with sudo

Install-Module AzureRM
Install-Module Azure

Check module location

(gmo -l Azure*).path

Uninstall

sudo apt-get remove powershell

Conclusion

After some hours i’ve given up making this thing work on Linux. The time it takes doesn’t payoff, and even if i could make it work, i would still need to make Vagrant work with it for some VM’s provisioning in a private cloud. It would take me less time to do it by hand :|

From a standard testing perspective it’s nice to have this thing on Linux, because you could centralize the management, but at the moment of this article it doesn’t seem to payoff the time one would need to setup this.

If you have lot’s of Windows machines or Azure infrastructure to manage just get a Windows PC, or wait for Microsoft to fix this, as there are lot’s of reports regarding this issue. But seriously i don’t see an effort from Microft to make this work properly, what’s the gain, rigth !?.

Cheers,
RR

References