Thursday, June 21, 2007

Last year at TechEd I was talking about the drive providers that ship with PowerShell, such as the ENV: drive that let's you view environment variables and the HKLM: and HKCU: drives that let you navigate the registry.

I said it would be cool if you could CD into your database server, and DIR the rows of a table. Here's how you can:

Demo SQL Provider Code

JD Trask has also put together a drive provider for mounting and navigating Zip archives:

How to Write a PowerShell drive provider

JD's example comes with some decent documentation explaining the four core classes that comprise the provider, showing how to install the provider and giving some ideas on how to extend the provider for extra credit.

It rather reminds me of a tcsh extension I used to use to cd into tar.gz's back in the day :)

All comments require the approval of the site owner before being displayed.
Name
E-mail
Home page

Comment (HTML not allowed)