Read RSS feeds via Powershell

It’s very easy to read RSS feeds via Powershell. You just need to use Invoke-WebRequest and convert the output to XML:

$chfeed = [xml](Invoke-WebRequest "")
$ | Select-Object @{Name="Id";Expression={$_."post-id".InnerText}}, title, link, pubDate


As we can see, it returns only 10 entries. So…

How to get older RSS feeds via Powershell?

It’s not so easy because it depends on the RSS type – ATOM e.g. works with “?page=2” … Other feed types do not support paging. If it’s an RSS 2.0 feed, then you can simply add “?paged=2” to the URL and you’ll get the second page.

Let’s use this information to create a Powershell script that returns all entries of a RSS feed:

$i = 1
while($true) {

    try { $chfeed = [xml](Invoke-WebRequest "$i") }
    catch { break; }

    $ | Select-Object @{Name="Id";Expression={$_."post-id".InnerText}}, title, link, pubDate


One response

  1. Just used this today. Thank you! Powershell scripting guy blog didn’t cover what you did. Casting as [xml] did the trick along with a little navigation prompting.

Leave a Reply

Your email address will not be published. Required fields are marked *