Newsgator PowerShell Provider is almost ready!

I worked for about 4-5 hours tonight on my Newsgator PowerShell provider. I just need to code up the right way to read a post, and I’m good to go (for an initial “release”). Eventually I’d like to support every operation the Newsgator API does (including adding/deleting/moving/etc. folders and feeds), but for now it’ s purely a read-only view.

Here are two resources I found helpful tonight as I did some research:

The MS PowerShell documentation will be nice… when it’s done. For now, it was mildly helpful (some decent info) but I kept getting mad at sections like this that were all over the place: (notice the missing code sample!!!)

Creating Drive State Information

All PowerShell providers are considered stateless, which means that your drive provider needs to create any state information that is needed by the PowerShell runtime when it calls your provider.

For this drive provider, state information includes the connection to the database that is kept as part of the drive information. Here is code that shows how this information is stored in the PSDriveInfo object that describes the drive.

[Aaron’s note: Ahem, code? Anyone seen code? Code?]

Creating a Drive

To allow the PowerShell runtime to create a drive, the drive provider must implement the NewDrive method. The following code shows the implementation of the NewDrive method for this drive provider.

[Aaron’s note: Again, where’s the code?]

I was fine without the code—I was able to figure it out in a reasonable amount of time—but I felt so teased. Mocked even. Oh well.

 

This entry was posted on Friday, July 14th, 2006 at 4:29 am and is filed under powershell. You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

2 Responses to “Newsgator PowerShell Provider is almost ready!”

  1. aaron Says:

    Thanks Jeffrey!

    I’ve submitted a CodePlex project request that was accepted, I’m just waiting in the queue to have the project created. Once it’s created, I’ll upload everything I’ve got and it will all be available. I’m a big fan of making personal projects available with full source and no strings attached.

  2. Jeffrey Snover Says:

    I hear you on the PowerShell documentation for providers. We’ll see about getting that improved for the V1 release.

    I can’t wait to get your provider. Are you going to provide the sourcecode or just the binaries?

    Jeffrey Snover [MSFT]
    Windows PowerShell/Aspen Architect
    Visit the Windows PowerShell Team blog at: http://blogs.msdn.com/PowerShell
    Visit the Windows PowerShell ScriptCenter at: http://www.microsoft.com/technet/scriptcenter/hubs/msh.mspx

Leave a Reply