Tags


Powershell

After reading Adam Preston’s Blog post about Making Powershell Talk I thought to myself “Finally!  We can make Powershell ACTUAlLY Sing!”

Well maybe not sing, But I quickly whipped it into a useful function in my Powershell Profile now called “OUT-VOICE” which can now upon command speak.

So armed with the original “Highway to Powershell” Lyrics, 5 minutes in Notepad and 1 one liner.

We have the REBIRTH of Highway to Powershell.

Save the Following Script as “HIGHWAY.PS1” and make sure a text file called Highway.csv (Second pile of text) is in the same folder

——— HIGHWAY.PS1 —————-

#
# Highway2Powershell.PS1
#

function global:out-voice ($words) { (new-object -com SAPI.SpVoice).speak($words) }

IMPORT-CSV ./HIGHWAY.CSV | FOREACH { WRITE-HOST $_.Lyric; OUT-VOICE ( $_.Lyric);  }

#
# End of Le Script
#

——— HIGHWAY.PS1 —————-

 

————– Save all from below down as HIGHWAY.CSV ———
Lyric
It’s so easy
and it’s free
Download it now it’ll take no time
Get it in
use it now
For to not would be such a crime
Shell of Power
Pipes of Dreams
Kiss your last wasted minutes away
Party now
let’s get down
I can’t wait to start this day

I’m using Powershell
Powershell
Cruisin’ with Powershell
Powershell

No Batch Files
Wasted minutes
So much power I’ve got to abuse
Using Get
Add it in
Clear data and Out it to you
Hey Bill G
Stevie B
Too much time on my hands
Done my work
Before I started
I won’t ever use those other brands

I’m using Powershell
Powershell
Microsoft Powershell
Powershell

Don’t End Task!

I’m using Powershell
Powershell
Windows Powershell
Powershell

No systems goin’ down……..
On my watch.

I’m usin’ Powershell

——————- HIGHWAY.CSV ————————–

Advertisements