With Halloween fast arriving, I thought I'd share some more holiday-themed fun. Today's entry isn't necessarily PowerShell related but you might use it with your PowerShell work. If you've been kicking the tires on the Windows Terminal project from Microsoft, you might enjoy this. Here's the finished product and then I'll show you how to recreate it.
ManageEngine ADManager Plus - Download Free Trial
Exclusive offer on ADManager Plus for US and UK regions. Claim now!
Technically, this started out as a CMD.exe window where I then launched PowerShell 7 Preview 5. Now I have the cheery ghostly head of Jeffrey Snover to watch over me. If you want to duplicate my setup, you'll need to download and save this image.
I know Jeffrey and believe he'd find this amusing. You of course, can use any holiday themed image you want.
Configure Settings
The first step is to edit your Windows Terminal settings which should open up VS Code, if you have it installed. You can either edit an existing profile or create a new one. If you decide to make a copy be sure to create a new guid (use the New-Guid cmdlet). I decided to edit my CMD.exe profile.
{ "acrylicOpacity": 1.0, "backgroundImage": "D:\\temp\\snover-head.png", "backgroundImageOpacity": 0.5, "backgroundImageStretchMode": "uniform", "closeOnExit": true, "colorScheme": "Halloween", "commandline": "cmd.exe", "cursorColor": "#000000", "cursorShape": "underscore", "fontFace": "chiller", "fontSize": 28, "guid": "{0caa0dad-35be-5f56-a8ff-afceeeaa6101}", "historySize": 9001, "icon": "ms-appx:///ProfileIcons/{0caa0dad-35be-5f56-a8ff-afceeeaa6101}.png", "name": "CMD", "padding": "0, 0, 0, 0", "snapOnInput": true, "startingDirectory": "%USERPROFILE%", "useAcrylic": true },
Don't forget to change the path to your graphic. You'll also need a copy of the Halloween color scheme.
{ "background": "#FFA500", "black": "#0C0C0C", "blue": "#0037DA", "brightBlack": "#767676", "brightBlue": "#3B78FF", "brightCyan": "#61D6D6", "brightGreen": "#16C60C", "brightPurple": "#B4009E", "brightRed": "#E74856", "brightWhite": "#F2F2F2", "brightYellow": "#F9F1A5", "cyan": "#3A96DD", "foreground": "#000000", "green": "#13A10E", "name": "Halloween", "purple": "#881798", "red": "#C50F1F", "white": "#CCCCCC", "yellow": "#C19C00" },
You should insert this into the Schemes section of the settings json file. Save your work and try the profile in Windows Terminal.
Fine Tuning PowerShell
If you are running PowerShell in your profile, you might need to tweak a few other colors. Depending on the version of PowerShell you might need to adjust values in
$host.ui.rawui
or use Set-PSReadlineOption. In my case, since PowerShell 7 is using version 2 of the PSReadline module, I can change the command color like this:
Set-PSReadLineOption -Colors @{Command="`e[37m"}
Look at help for PSReadline in your console to see what you might need to do.
Happy Halloween!