CmdletProvider.Start(ProviderInfo) CmdletProvider.Start(ProviderInfo) Method


Gives the provider the opportunity to initialize itself.

protected virtual System.Management.Automation.ProviderInfo Start (System.Management.Automation.ProviderInfo providerInfo);
abstract member Start : System.Management.Automation.ProviderInfo -> System.Management.Automation.ProviderInfo
override this.Start : System.Management.Automation.ProviderInfo -> System.Management.Automation.ProviderInfo
ProviderInfo ProviderInfo

The information about the provider that is being started.



The default implementation returns the ProviderInfo instance that was passed.

To have session state maintain persisted data on behalf of the provider, the provider should derive from ProviderInfo and add any properties or methods for the data it wishes to persist. When Start gets called the provider should construct an instance of its derived ProviderInfo using the providerInfo that is passed in and return that new instance.

Applies to