AccessDBProviderSample01

This sample shows how to declare a provider class that derives directly from the CmdletProvider class. It is included here only for completeness.

Demonstrates

Important Note:
Your provider class will most likely derive from one of the following classes and possibly implement other provider interfaces:

For more information about choosing which provider class to derive from based on provider features, see Designing Your Windows PowerShell Provider.

This sample demonstrates the following:

  • Declaring the CmdletProvider attribute.

  • Defining a provider class that derives directly from the CmdletProvider class.

Example

This sample shows how to define a provider class and how to declare the CmdletProvider attribute.

namespace Microsoft.Samples.PowerShell.Providers
{
  using System.Management.Automation;
  using System.Management.Automation.Provider;
  
  /// <summary>
  /// This sample shows how to declare a provider class and how to 
  /// declare the CmdletProvider attribute.
  /// </summary>
  [CmdletProvider("AccessDB", ProviderCapabilities.None)]
  public class AccessDBProvider : CmdletProvider
  {
    // Add provider logic here.
  }
}

See Also



Show:
© 2014 Microsoft