BSonPosh made me smile this morning with this fun little script http://bsonposh.com/archives/1076… One issue… I like a BIG tree, so I refactored Brandon’s code, Enjoy.
$Rows = 15 $colors = "DarkRed","Cyan","Red","Magenta","Yellow","White","cyan" while($true) { $oldpos = $host.ui.RawUI.CursorPosition Foreach ($r in ($rows..1)){ write-host $(" " * $r) -NoNewline 1..((($rows -$r) * 2)+1) | %{ if (($_%2) -eq 0) { write-Host "*" -ForegroundColor Darkgreen -nonewline } else { write-Host "*" -ForegroundColor ($colors | get-random) -nonewline } } write-host "" } # trunk write-host $("{0}***" -f (' ' * ($Rows -1) )) -ForegroundColor DarkGreen write-host $("{0}***" -f (' ' * ($Rows -1) )) -ForegroundColor DarkGreen $host.ui.RawUI.CursorPosition = $oldpos sleep .05 }
‘Tis the season,
~Glenn
NiTRo | 15-Dec-09 at 8:10 am | Permalink
I love it !!
NiTRo | 15-Dec-09 at 8:17 am | Permalink
try to replace “sleep .05″ by
$timer = get-random -Minimum 0.1 -Maximum 0.9
sleep $timer
Sapin (Powershell) de Noël - Hypervisor.fr | 16-Dec-09 at 7:06 am | Permalink
[...] de get-admin nous fait profiter de la V2 du Cheesy Christmas Tree Script. Un sapin illuminé (et qui clignote) façon Galeries Lafayette en Powershell, c’est la [...]
Sean Kearney | 17-Dec-09 at 10:21 pm | Permalink
Glenn
Here’s a little more holiday cheer. I took your tree and modified the lights a bit to speed it up or make a larger tree
Let me know what you think. Your tree got me goin’
http://ye110beard.spaces.live.com/blog/cns!952F95CB5DE3F349!2379.entry
Sean
“Highway to Powershell” – the ENERGIZED Tech
Sean Kearney | 18-Dec-09 at 6:41 pm | Permalink
Ummmm I went a little overboard last night…
I threw in a Marquee and redid the lights routine.
Unfortunately it’s now actually PUSHING the CPU!
http://ye110beard.spaces.live.com/blog/cns!952F95CB5DE3F349!2385.entry
Enjoy Happy Holidays
Sean
The Energized Tech
“Highway to Powershell”
Bert салоны | 20-Dec-09 at 12:48 pm | Permalink
Really enjoyed this! Well done!