PowerShell and the RSS Platform
Oh, this is just too much fun. Check this out - a PowerShell script to display the feeds you're subscribed to (in the common RSS store you get with IE7) which have unread items:
$feeds = (new-object -ComObject Microsoft.FeedsManager); % { $feeds.RootFolder.Subfolders | % {$_.Feeds} | select-object -pr UnreadItemCount, Title; $feeds.RootFolder.Feeds | select-object -pr UnreadItemCount, Title } | where {$_.UnreadItemCount -gt 0} | format-table -au I haven't found a "nice" way to combine the output of two commands into one array, but just executing both together inside a scriptblock like this appears to work.
What do you think? It's amazing the sort of stuff you can do in PowerShell!
Update! You can combine the results of two commands into a single array! Here's an updated script:
$feeds = (new-object -ComObject Microsoft.FeedsManager); @( $feeds.RootFolder.Subfolders | % {$_.Feeds} | select-object -pr UnreadItemCount, Title; $feeds.RootFolder.Feeds | select-object -pr UnreadItemCount, Title ) | where {$_.UnreadItemCount -gt 0} | format-table -au And here's the output on my machine right now:
UnreadItemCount Title --------------- ----- 4 digg 1 Slashdot
