PowerTip: Cast an RSS Feed into XML with PowerShell

The Scripting Guys

Dr Scripto

Summary: Use Windows PowerShell to cast an RSS feed to an XML document.

Hey, Scripting Guy! Question How can you navigate an RSS feed as if it was an XML document by using Windows PowerShell?

Hey, Scripting Guy! Answer When retrieving an RSS feed, ensure that you cast it to an XML document by using the [xml] type accelerator:

            [xml]$hsg = Invoke-WebRequest http://blogs.technet.com/b/heyscriptingguy/atom.aspx

The Scripting Guys
Dr Scripto

Follow Dr Scripto   

No Comments.