The estimated reading time 1 minutes

First off, let me thank all of you for your support and interest in my work this past year. Without it I’d be another guy sitting in his basement talking to himself.
The last 10 months have been a great challenge for all of us, but I don’t want to talk like all the famous politicians. So thanks for supporting my blog and stay healthy in these difficult times.

Here is some powershell fun for christmas( found in the depths of internet) :

$height = 11
$Message = "Merry Christmas!"

0..($height-1) | % { Write-Host ' ' -NoNewline }
Write-Host -ForegroundColor Yellow '☆'
0..($height - 1) | %{
    $width = $_ * 2 
    1..($height - $_) | %{ Write-Host ' ' -NoNewline}

    Write-Host '/' -NoNewline -ForegroundColor Green
    while($Width -gt 0){
        switch (Get-Random -Minimum 1 -Maximum 20) {
            1       { Write-Host -BackgroundColor Green -ForegroundColor Red '@' -NoNewline }
            2       { Write-Host -BackgroundColor Green -ForegroundColor Green '@' -NoNewline }
            3       { Write-Host -BackgroundColor Green -ForegroundColor Blue '@' -NoNewline }
            4       { Write-Host -BackgroundColor Green -ForegroundColor Yellow '@' -NoNewline }
            5       { Write-Host -BackgroundColor Green -ForegroundColor Magenta '@' -NoNewline }
            Default { Write-Host -BackgroundColor Green ' ' -NoNewline }
        }
        $Width--
    }
     Write-Host '\' -ForegroundColor Green
}
0..($height*2) | %{ Write-Host -ForegroundColor Green '~' -NoNewline }
Write-Host -ForegroundColor Green '~'
0..($height-1) | % { Write-Host ' ' -NoNewline }
Write-Host -BackgroundColor Black -ForegroundColor Black ' '
$Padding = ($Height * 2 - $Message.Length) / 2
if($Padding -gt 0){
    1..$Padding | % { Write-Host ' ' -NoNewline }
}
0..($Message.Length -1) | %{
    $Index = $_
    switch ($Index % 2 ){
        0 { Write-Host -ForegroundColor Green $Message[$Index] -NoNewline }
        1 { Write-Host -ForegroundColor Red $Message[$Index] -NoNewline }
    }
} 
Print Friendly, PDF & Email
  • Was this Helpful ?
  • yes   no