How RSSBus is useful in PowerShell

PowerShell users are scripters and developers who love productivity tools.  That’s why you and I like PowerShell – it gives us so much to help us work more efficiently.  RSSBus is another swiss-army knife of technology along this same vein, and is a handy complement to PowerShell.

The biggest wins? 

#1, RSSBus makes it easy to get data.  No matter the source of the data (tons of sources are supported already, with many more to come and an open interface so anybody can build more data connectors), with RSSBus you access it in exactly the same way:  a simple HTTP request.  This fact opens a lot of doors that we might otherwise leave closed until we had the time to code different scripts for each of these data sources individually.

#2, RSSBus makes it very easy to work with that data because no matter where the data comes from, it will always be presented to you as name/value pairs – ie RSS (RSS is not the only output format supported by RSSBus, but it is the default).  Of course XML is very easy to work with in PowerShell.  With a simple http request from PowerShell to RSSBus, you have XML with items describing data from a database, web service, CRM system, Internet server, file system, Office applications, etc.

Generating Custom RSS Feeds

RSSBus can also be used to generate your own custom RSS feeds even if the source data doesn’t come from one of the RSSBus Connectors.  Through the PowerShell Language Connector, you can write a PowerShell script that RSSBus will automatically convert into an RSS feed.  For each object output by your script, RSSBus will create an RSS item and push it into a feed for you.  For example, the following RSSBus script will generate an RSS feed in which each item is an output object coming from the get-process PowerShell command:

<rsb:script language="ps1">
get-process
</
rsb:script>

This is essentially the “Hello World” of PowerShell scripts in RSSBus.  You also have access to input, the http context, etc.  As an example, you can filter the results using a regular PowerShell pipeline, like so:

<rsb:script language="ps1">
$mask = $rsb.GetInput("mask");
get-process | where {$_.name -match $mask}
</
rsb:script>

The “mask” input just comes from the http request. 

I hope this helps illustrate some of the extra juice that RSSBus can offer to PowerShell users.  Let me know if you have questions.

Technorati Tags: ,

Print | posted on Friday, April 3, 2009 12:26 PM

Feedback

No comments posted yet.

Your comment:





 

Copyright © Lance Robinson

Design by Bartosz Brzezinski

Design by Phil Haack Based On A Design By Bartosz Brzezinski