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

Prompting for the Holidays

Posted on December 1, 2015December 2, 2015

This should wait for a Friday Fun post but since it is December 1st I decided not to wait. It is that time of year again and my PowerShell prompt is colorful and sparkly.

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!


My holiday themed PowerShell prompt (Image Credit: Jeff Hicks)

In my profile I have this code to use a new Prompt function.

if ((Get-Date).Month -eq 12 -AND !((Get-Date).Day -ge 25)) {
Function Prompt {…}
}

I've posted the custom prompt before but now that I'm using GitHub a bit more, I've posted it as a Gist which you can find at https://gist.github.com/jdhitsolutions/f85eb9474c04d40c79ec#file-pschristmasprompt-ps1.

You can't really pass parameters to a Prompt function so if you want to customize it you need to edit the file. One things I've thought of is changing the text so that instead of "Christmas in…" it might say "Santa Comes"

Santa Prompt
Santa Prompt (Image Credit: Jeff Hicks)

Or maybe this:

Another holiday promptAnother holiday prompt (Image Credit: Jeff Hicks)

And it doesn't take much effort to support other holidays.

A Hanukkah versionA Hanukkah version (Image Credit: Jeff Hicks)

You can find this version of the prompt function at https://gist.github.com/jdhitsolutions/c26c0a4fb2112ca6e74e#file-pshanukkahprompt-ps1.

Whatever your sentiment I hope you have a happy and healthy holiday season.

Update 2 December: It appears that some of the special characters I was using aren't supported in Windows 10. [CHAR]14 is supposed to be a musical note and [CHAR]15 is like a snowflake. In Windows 10 they don't display. You can select any other character you want, or none at all.


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