PSProvider 0.2

Rating:        Based on 1 rating
Reviewed:  1 review
Downloads: 64
Change Set: 71316
Released: Jun 25, 2010
Updated: Jun 26, 2010 by oisin
Dev status: Beta Help Icon

Recommended Download

Application PSProvider Framework 0.2
application, 23K, uploaded Jun 25, 2010 - 33 downloads

Other Available Downloads

Example Tree Template Module
example, 3K, uploaded Jun 26, 2010 - 31 downloads

Release Notes

Changes

  • Support NavigationCmdletProvider & ContainerCmdletProvider
  • Provider names: ContainerScriptProvider & TreeScriptProvider
  • Tree Module Template included
If you want to figure out the order that the various methods are called by the PowerShell engine, and which are required per operation, you should bind the Tree Template module and set your $VerbosePreference to "Continue." The template will tell you which methods are being called by the engine each time you try different cmdlets like Set-Location, Get-Item, Test-Path etc.

See the documentation for links and help about writing providers. All functions in psprovider template modules represent the exact same methods you'd have to implement if you were writing a provider in C# or VB.NET

Example test.ps1 script for testing a module in ISE:
# load framework
ipmo .\PSProviderFramework.dll

# remove tree drive if already mounted
if (get-psdrive tree -ea 0) { cd c:; remove-psdrive tree }

# remount tree drive with latest version of module
new-psdrive tree treescriptprovider -module $(ipmo .\tree-template.psm1 -pass -force) -root / -verbose

The above script should be in one file in ISE, and the module you are binding in another file; both should be in the same tab (so they share a runspace.) Breakpoints should work as you'd expect, so debugging is easy-peasy.

Reviews for this release

     
This is awesome. It brings down the barrier to custom providers quite a bit by putting it into the script level that IT admins are comfortable at. You can have that fifth star when Content and/or Property is implementable ;-)
by Jaykul on Jun 28, 2010 at 6:11 PM