O'Reilly logo

Microsoft Windows PowerShell 3.0 First Look by Adam Driscoll

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing a simple WMI provider

In the following example, we will generate the MOF and build the skeleton for a provider from scratch. We won't actually implement the provider's internals but we will see how easy it is to get started creating a provider. Once this is done we will use the new cmdletization feature found in the WMF to create native PowerShell cmdlets without having to write any code or scripts to do so. The goal of this provider is to list the connected network drives and provide a way of disconnecting them. This section will not be about the code necessary in implementing the actual provider as this is beyond the scope of this book.

The first step in creating our new WMI provider is to author the MOF, as seen in the previous ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required