Installing PowerShell on Kali linux 2018.4

Environment

root@kali:# uname -a
Linux kali 4.18.0-kali3-amd64 #1 SMP Debian 4.18.20-2kali2 (2018-11-30) x86_64 GNU/Linux

Explanation

Installing PowerShell on Kali linux for RASTALABS

Solution

1. Installing Dependencies

As we try to install PowerShell according to the official website, we have this error.

root@kali:# apt-get install -y powershell
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 powershell : Depends: libssl1.0.0 but it is not installable
E: Unable to correct problems, you have held broken packages.

However, we do not have the package “libssl1.0.0”.
Then, we can download the package from here and install.

root@kali:# dpkg -i libssl1.0.0_1.0.1t-1+deb8u10_amd64.deb 
Selecting previously unselected package libssl1.0.0:amd64.
dpkg: regarding libssl1.0.0_1.0.1t-1+deb8u10_amd64.deb containing libssl1.0.0:amd64, pre-dependency problem:
 libssl1.0.0 pre-depends on multiarch-support
  multiarch-support is not installed.

dpkg: error processing archive libssl1.0.0_1.0.1t-1+deb8u10_amd64.deb (--install):
 pre-dependency problem - not installing libssl1.0.0:amd64
Errors were encountered while processing:
 libssl1.0.0_1.0.1t-1+deb8u10_amd64.deb

Sounds like we are still missing package “multiarch-support”.
After installing the package, we can install libssl1.0.0 and powershell correctly.

root@kali:# apt-get install multiarch-support
root@kali:# dpkg -i libssl1.0.0_1.0.1t-1+deb8u10_amd64.deb
root@kali:# apt-get install powershell
root@kali:# pwsh
PowerShell 6.1.2
Copyright (c) Microsoft Corporation. All rights reserved.

https://aka.ms/pscore6-docs
Type 'help' to get help.

PS /root/Downloads>