
How to Secure Apache with Let’s Encrypt SSL on a VPS (Step-by-Step Guide)
June 30, 2025
Run MagicRecon in Docker: Bug Bounty Recon with Kali Linux (Step-by-Step Guide)
July 1, 2025How to Install PowerShell on Kali Linux
Last verified for accuracy: July 25, 2025
Need to run PowerShell scripts on Kali Linux? Microsoft officially supports it and the install process is quick and easy.
This guide walks you through the setup in a few simple steps.
🔧 Step 1: Install Dependencies
First, make sure your system is up to date and has the required packages:
This command installs three packages (wget, apt-transport-https, and software-properties-common), which help with downloading files, accessing secure repositories, and managing software sources, respectively.
It doesn’t matter which directory you’re in when you run this command on Kali Linux (or any Debian-based system, for that matter). The apt package manager works system-wide, and it installs software globally. So whether you’re in your home directory, the root directory, or any subdirectory, the result will be the same.
🔑 Step 2: Import Microsoft GPG Key
This command downloads and adds Microsoft’s GPG key to your system’s trusted keyring. This step ensures packages from Microsoft are trusted:
This step is required when installing PowerShell (or other Microsoft packages) on Kali Linux. Microsoft’s official repository is signed with this GPG key, and your system needs this key to trust packages coming from it. Without this key, your system will refuse to install packages from the repository because it can’t verify that they’re from a trusted source.
📦 Step 3: Add the PowerShell Repository
This command adds the official Microsoft repository for Debian-based systems (including Kali Linux) to your list of trusted sources. This repository will contain the necessary packages for installing PowerShell and other Microsoft tools.
⚙️ Step 4: Install PowerShell
sudo apt update: Contacts all the repositories listed in /etc/apt/sources.list and /etc/apt/sources.list.d/, downloads the latest information (metadata) about the available packages, and updates your system’s local cache. It does not install or upgrade any packages. It simply ensures that your system has the most up-to-date information about available software.
sudo apt install -y powershell: Installs the PowerShell package from the Microsoft repository that you configured earlier. It will download and install the necessary dependencies for PowerShell to run on your system. PowerShell will be available on your system after installation, and you can start it by typing pwsh in the terminal.
🚀 Step 5: Launch PowerShell
Type the following to start PowerShell:
Getting Help in PowerShell:
To get help with any cmdlet or function in PowerShell, simply use the Get-Help command followed by the name of the cmdlet. For example, to learn more about the Get-Process cmdlet, run:
Get-Help Get-Process
This will display detailed information, including syntax, examples, and usage tips. You can also use Get-Help
✅ Conclusion
- This installs the stable release of PowerShell Core.
- Use
pwsh
to run PowerShell any time. - Works smoothly on recent Kali builds (based on Debian Bullseye).
⭐ Ready for a reliable, high-performance VPS at an unbeatable price? We host our own Kali labs on Hostinger: 4 vCPU, NVMe storage, 16 GB RAM and 16 TB bandwidth, backed by 24/7 support and a 30-day money-back guarantee. You’ll save up to 20% when you lock in a 24-month plan. Grab a Hostinger VPS using this referral link and support our content.
🚀 Claim Your Hostinger VPS Now (from only US$ 7.99/mo)