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.
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 (Image Credit: Jeff Hicks)
Or maybe this:
Another holiday prompt (Image Credit: Jeff Hicks)
And it doesn't take much effort to support other holidays.
A 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.