The console (terminal) on Windows has come a long way since command.com. PowerShell might seem weird at first if you’re used to bash on *nix, but it’s grown into a very powerful console and scripting tool.
Over the years, I’ve gathered a list of my favorite plugins and tweaks to make PowerShell and the console even better. In this post, I’ll show you how to customize PowerShell on Windows 10 for an awesome console experience.
ConEmu for a tabbed console
First things first, install ConEmu. ConEmu is a terminal that can run any shell in a tabbed window. In other words, it’s a nice “frame” around PowerShell, cmd.exe, or other CLI applications:
ConEmu gives you a huge variety of options and ways to customize how the console looks and behaves. Once you start using it, you won’t go back to plain powershell.exe.
Chocolatey for package management
Chocolatey is the missing package manager for Windows. It makes it easy to install and update tools and programs from the console. If you’ve used
brew on macOS or
apt-get install on Debian, you’ll feel right at home.
Chocolatey must be installed (and run) from an administrative shell. You can start PowerShell as an admin by searching for and right-clicking on Windows PowerShell in the Start Menu and choosing Run as administrator. Or, in ConEmu, click on the + icon and choose PowerShell (Admin).
You can refer to the official install instructions, but here’s the gist: from an administrative PowerShell console, run:
Set-ExecutionPolicy AllSigned; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco -? to make sure it’s installed:
Here’s what you can do with Chocolatey, at a glance:
- Search for packages and install them with
choco install <packagename>
- Remove packages with
choco uninstall <packagename>
- See what’s installed with
choco list --local-only
- Check for outdated packages with
- Upgrade outdated packages with
choco upgrade <packagename>or
choco upgrade all
- Much more (try
Git for Windows
If you use Git for version control, you’ll need Git for Windows. You can download and install it from the official site, or with
choco install git (again, make sure you do this from an administrative shell).
After it’s done installing, restart the console and run
git --version to make sure it’s on your PATH.
posh-git for a nicer Git experience
Once you have Git for Windows installed, you’ll definitely want posh-git. posh-git adds some much-needed conveniences to the Git experience, such as tab-completion and a customizable prompt message:
Install posh-git with the official installation instructions or with
choco install poshgit. Then, restart your console and navigate to a local Git repo. If you don’t see the current branch in the prompt, run
Add-PoshGitToProfile -AllHosts and restart the console once more.
- Set up a smoking Git shell on Windows by Phil Haack
- Better Git with PowerShell also by Phil Haack
- Is there a better Windows Console Window? on StackOverflow
What are your favorite console tweaks? Let me know in the comments!