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.
Install following two libraries
sudo apt-get install libunwind8 libicu55
Install the PowerShell – Exicute the downloaded Poweshell package
sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
Next enter the command powershell and you will get the PowerShell prompt as below.
You can find additional documentation from following links