Wednesday, March 7, 2007

Comments feed in Community Server

With some help from Lance, I'm posting an entry on how to get access to an RSS feed of comments from the great online forum product Community Server.  Apparently, their newer version (currently in beta) makes this available via a viewable RSS feed link.

Very simple script/example below.  It will print out the blog post titles, then the next line will be the RSS feed address to the comments.

PowerShell script:

[string]$url="http://powergadgets.com/csPg/blogs/powergadgets/rss.aspx"
$wc = new-Object System.Net.WebClient
[xml]$nl = $wc.DownloadString($url)
$nl.rss.channel.item|%{$_.title,$_.commentRss}

[end script]