blog header
Subscribe via: (Email / RSS)

PowerShell RSS-Powered Message of the Day

by Harley Stagner on June 4, 2009

I am just having a little fun with PowerShell tonight and my profile. Don’t use PowerShell profiles? You should. Here is the skinny to get you started.

Profiles are very very useful for efficiently getting some serious work done while in the Shell. But this post is about nothing of the sort. Once you know how to edit your profile by using the above link, you can do all sorts of cool stuff.

Now for your entertainment and amusement, see an RSS-powered quote of the day when you start up PowerShell! Just add this function to your PowerShell profile and save it:

function motd {

$rssUrl = "http://feeds.feedburner.com/brainyquote/QUOTEBR"
$blog = 1(new-object System.Net.WebClient).DownloadString($rssUrl)
$quote = $blog.rss.channel.item[0]
$quote.description
$quote.title

}

motd{}

Here it is in all of it’s glory!
psh motd

Thanks goes out to Chrissy over at NetNerds for the inspiration.

Leave a Comment