Bonnes fêtes de Noël à tous - Enjoy !:)

 

 

$Rows = 14
$colors = "DarkBlue","DarkGreen","DarkCyan","DarkRed","DarkMagenta","DarkYellow","Gray","DarkGray","Blue","Green","Cyan","Red","Magenta","Yellow","White"

while($true)
{
$oldpos = $host.ui.RawUI.CursorPosition
write-host $(" " * $($Rows+1)) -NoNewline
write-Host "*" -ForegroundColor Yellow -nonewline
write-host ""
Foreach ($r in ($rows..1)){
write-host $(" " * $r) -NoNewline
write-Host "*" -ForegroundColor Yellow -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 "*" -ForegroundColor Yellow -nonewline
write-host ""
}
# trunk
write-host $("{0}***" -f (' ' * ($Rows) )) -ForegroundColor DarkGreen
write-host $("{0}***" -f (' ' * ($Rows) )) -ForegroundColor DarkGreen
write-host $("{0}***" -f (' ' * ($Rows) )) -ForegroundColor DarkGreen
$host.ui.RawUI.CursorPosition = $oldpos
sleep (get-random -Minimum 0.1 -Maximum 0.9)
}