Few weeks back Microsoft announced the alpha version of PowerShell for Linux. Now its open source, and available for Linux and Mac. You can download official packages from Microsoft for the 64-bit versions of Ubuntu 16.04, Ubuntu 14.04, CentOS 7, Red Hat Enterprise Linux 7, and Mac OS X 10.11.
How to do it ?
In this demo I used Ubuntu Linux 16.04, you can use preferred Linux distributions or Mac OS X for this.
First you have to download the relevant PowerShell package for the OS. You can download it from release page.
<br /> wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb<br />
Install following two libraries
<br /> sudo apt-get install libunwind8 libicu55<br />
Install the PowerShell – Exicute the downloaded Poweshell package
<br /> sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb<br />
Next enter the command powershell and you will get the PowerShell prompt as below.
You can find additional documentation from following links