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

Valentines Day PowerShell Fun

Posted on February 14, 2012February 14, 2012

In case you missed some of the fun on Twitter and Google Plus, here are the PowerShell valentines I sent today. These are intended to be run from the PowerShell console, not the ISE. Also, depending on your console font, you might get slightly different results. I use Lucida Console.

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!

 

 


#1
write-host (([char]3 -as [string])*14) -ForegroundColor red

#2
$s="Be My Valentine"
[string]$hrt=[char]3

$s.split() | foreach -begin {$a="" }{$a+= "$_$hrt"} -end {write-host $a -ForegroundColor Magenta}

#alternative
$s.split() | foreach {Write-Host $_ -nonewline -foregroundcolor Magenta; Write-Host $hrt -nonewline -ForegroundColor Red} -end {"`n"}

#3
Write-Host "U make my $([char]3) $([char]14)" -foregroundcolor magenta -backgroundcolor yellow

#variation from Josh Atwell
Write-Host "Wild thing!" -ForegroundColor Yellow -BackgroundColor Magenta
Start-Sleep -Seconds 1
Write-Host "U make my $([char]3) $([char]14)" -ForegroundColor magenta -BackgroundColor yellow

#4
write-host "$([char]12)$([char]3)$([char]11)=$([char]2)" -foregroundcolor red -backgroundcolor white

Download MoreValentines.ps1 But I recommend you accompany this with at least a bouquet of nice flowers.


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