get updates!

welcome!

Welcome to the 0direction blog! My name is Cory and I am a 10 year veteran of the IT industry currently working for MaximumASP as a Senior System Engineer specializing in Storage and Disaster Recovery. If you find something here that helps you, please leave a comment! If you see something that could be improved or have a question, please send me some feedback! Happy scripting! -Cory

Reading an RSS feed with Powershell

This is a pretty cool (but mostly useless) PowerShell script that uses the System.Net.Webclient class and the DownloadString method. It pulls an RSS feed string from a URL into an XML formatted variable, and then pipes the Rss.Channel.Item property (which is where the meat of the RSS feed is held in the variable) into the format-table commandlet using the Title and Link properties of the feed to format the table.

1
2
3
[xml]$XMLRss = (new-object net.webclient).DownloadString("http://0direction.com/blog/index.php/feed/")
 
$XMLRss.rss.channel.item| format-table title,link

What you should end up with is a nicely formatted table containing the title’s of the last 10 of my blog posts, and links to the corresponding posts.
RSSTable

  • Twitter
  • Facebook
  • LinkedIn
  • Digg
  • Google Bookmarks
  • Slashdot
  • StumbleUpon
  • Live
  • FriendFeed
  • Ping.fm
  • Print
  • email
  • PDF
  • RSS

Leave a Reply

 

 

 

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="">