View Issue Details
|0005290: Build powershell packages from sources
For the past several months I have been working on maintaining the packages for Powershell Core to be working on Kali Linux. It appears that other distributions are now pushing Powershell to their Linux Distributions as well. Since other distributions are pushing Powershell on their Linux distributions I thought it would be fantastic if Kali Linux could also have it built-in to its operating system. Powershell is one of the most powerful languages for windows systems and many people are starting to use it now more then ever.
Please let me know if you decide to take this feature request into consideration because I absolutely love to help you all get Powershell working and installed by default on Kali Linux.
|Steps To Reproduce
I have tested this in Kali Linux 2019.1 and it works very well!
First, we need to download and add the public repository GPG key so APT will trust the packages and alert you to any issues with package signatures:
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/PowerShell.list
Third we will need to install the following dependency packages below to continue the installation. You can download the package here:
Once the packages have been installed we can then install powershell on Kali Linux:
root@kali:~# apt-get install powershell
Neat. So would this allow .PS1 files to be run and executed within the context of Kali?
@akozlov Yep and even to import modules as well. However, powershell for linux uses .net core instead of .net framework but I do not think there are any big differences. Still testing that out :D
You say " It appears that other distributions are now pushing Powershell to their Linux Distributions as well.". Can you give us pointers related to this? If others are working on this, it might make sense to cooperate instead of doing it alone on our side. So please share any link/information that you might have.
FWIW, we are definitely interested in having powershell available as a first-class package in our repository. We will be working on it and I will keep this bug updated. But it will require some significant work, we will see.
@rhertzog Microsoft Published an article on how you can install powershell for different Linux distributions shown here: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-linux?view=powershell-6
In the past, the instructions for installing Kali Linux are incorrect. That's why I created a guide back in September that covers step by step on installing PowerShell for Kali Linux.
As of now, the latest version of Ubuntu contains a snap in package that you can select to have PowerShell automatically install on your Ubuntu System. I do not know if there is one for debian based systems but it is definitely something we should look into further to see what process they have created already for adding powershell to Kali.
powershell is now in kali-rolling for amd64
Sharing information gathered from MS: to build Powershell from source, we also need to build .NET Core from source. The latter can be done through https://github.com/dotnet/core-sdk
|File Added: Proof of Powershell.PNG
|Note Added: 0010395
|Note Added: 0010400
|new => assigned
|Note Added: 0010534
|Note Added: 0010535
|Note Added: 0010549
|has duplicate 0005624
|Note Added: 0011081
|Note Added: 0011217
|urgent => low
|Adding Powershell Core to be in the main installation of Kali Linux => Build powershell packages from sources
|Steps to Reproduce Updated
|feature => minor