Skip to content
Menu
The Lonely Administrator
  • PowerShell Tips & Tricks
  • Books & Training
  • Essential PowerShell Learning Resources
  • Privacy Policy
  • About Me
The Lonely Administrator

Cool Custom Consoles

Posted on March 31, 2010July 2, 2013

Ok, maybe this isn’t as slick as something from West Coast Customs but maybe you’d like to add a little style to your PowerShell session. I’m talking about the (by now) staid blue console. Perhaps you don’t like blue or the color contrast isn’t too your liking. Here are some things to try if you want to customize your console.

Manage and Report Active Directory, Exchange and Microsoft 365 with
ManageEngine ADManager Plus - Download Free Trial

Exclusive offer on ADManager Plus for US and UK regions. Claim now!

In my PowerShell profile I have three lines that set the title to the PowerShell window, as well as change the background and foreground colors.

#reconfigure the console            
[console]::Title="Windows PowerShell 2.0"            
[console]::BackgroundColor="black"            
[console]::ForegroundColor="green"


I don’t show it, but you need to run CLS to refresh the console.

As you can see all I’m doing is modifying a few settings for the System.Console class. The properties should be self-explanatory. Here’s the end result.

powerShell-colorized

One potential drawback is that any script that is using Write-Host and a green font will be indistinguishable from pipelined output.  As long as I stay away from yellow and red, since they are used for warnings, verbose and errors, I should be ok. You can use any color that you would with Write-Host. If you need to reset back to the original console color scheme at any time use this expression:

PS C:\Scripts> [console]::ResetColor() ; cls

You might also like to change the buffer width and height

[console]::BufferHeight=3000

[console]::BufferWidth=120

I like big buffers, what can I say. I made these settings part of the console properties, but I should put them in my profile so that no matter what PowerShell window I open it will be set the same.

How do you like your shell?


Behind the PowerShell Pipeline

Share this:

  • Click to share on X (Opens in new window) X
  • Click to share on Facebook (Opens in new window) Facebook
  • Click to share on Mastodon (Opens in new window) Mastodon
  • Click to share on LinkedIn (Opens in new window) LinkedIn
  • Click to share on Pocket (Opens in new window) Pocket
  • Click to share on Reddit (Opens in new window) Reddit
  • Click to print (Opens in new window) Print
  • Click to email a link to a friend (Opens in new window) Email

Like this:

Like Loading...

Related

reports

Powered by Buttondown.

Join me on Mastodon

The PowerShell Practice Primer
Learn PowerShell in a Month of Lunches Fourth edition


Get More PowerShell Books

Other Online Content

github



PluralSightAuthor

Active Directory ADSI Automation Backup Books CIM CLI conferences console Friday Fun FridayFun Function functions Get-WMIObject GitHub hashtable HTML Hyper-V Iron Scripter ISE Measure-Object module modules MrRoboto new-object objects Out-Gridview Pipeline PowerShell PowerShell ISE Profile prompt Registry Regular Expressions remoting SAPIEN ScriptBlock Scripting Techmentor Training VBScript WMI WPF Write-Host xml

©2025 The Lonely Administrator | Powered by SuperbThemes!
%d