A Common Feed Store PowerShell Provider
After my success yesterday in accessing the Common Feed Store from PowerShell, I started to wonder just how difficult it would be to write a provider for PowerShell so that I could access my feeds as if they were folders and files. You see, in PowerShell, you're not limited to hard drives and files when you use "dir", "cd" etc - you can change into the Windows Registry, or into the certificate store ... all sorts of places.
So I did some reading on MSDN about creating your own PowerShell providers.
A few hours later, and I can now do this:
cd feed: dir -recurse | where {$_.Modified -gt [DateTime]::Now.AddMinutes(-90)} | ft Title ... which yields this output:
Title ----- Opening & Saving Word, PowerPoint and Excel 2... Niche Player No More; Apple in the running f... Where's the Cowboy Talk Now? Open Source Music Software & The AGNULA Proje... Zelda:Twilight Princess for GameCube NOT to b... Old buddies reunite in hopes of taking tech w... Fifteen Exercises for Learning a new Programm... LOST - Further Instructions Recap
Engadget's relaunch giveaways: Slingbox PRO w...
In other words, I can list out from the command-line all the items in my feeds that have been updated in the last 90 minutes!
I'll keep working on this provider to give it more functionality. For example, right now you can't use wildcards when you type "dir", and there is no default formatting for feeds, so you need to pipe everything through to format-table to get a nice output. Still, not bad for a few hours' work!!!

Comments
# lb
22/10/2006 3:40 PM
brilliant stuff!
# mabster
22/10/2006 4:37 PM
Thanks Leon!
# Sung M Kim
24/10/2006 4:04 AM
Hello there Mabster?
The feedstore looks quite awesome for someone(like me) who subscribes to myriads of RSS feeds.
I was also trying to write a provider for EventLog but I was not able to justify whether accessing EventLog through a provider would be more beneficial than accessing EventLog through the already built-in cmdlet like "Get-EventLog". But now I have found a way to get connect to the remote machine's EventLog,(which Get-EventLOg doesn't support yet) it does seem to make sense to write one.
I was also going through PowerShell CX and saw your post about adding your feedstore provider to PsCX.
So I am wondering what features will be avaiable for the provider ;)
Anyways, I would love to see more of this provider~ ;)
# mabster
24/10/2006 6:57 AM
Hi Sung,
I'll keep blogging as I do more with the provider.
At the moment we're just waiting for PsCx to release their first alpha version before I add it to their source code, so keep an eye out for alpha 2 or possibly beta 1 before you see it.
I know what you mean about provider vs cmdlets - I struggled with that myself. In the end, the provider seems to give me a more consistent feel than lots of separate cmdlets.
Leave a comment if you have any feature requests for this provider!