CmdletProvider.Start(ProviderInfo) Method

Definition

Gives the provider the opportunity to initialize itself.

C++
protected:
 virtual System::Management::Automation::ProviderInfo ^ Start(System::Management::Automation::ProviderInfo ^ providerInfo);

Parameters

providerInfo
ProviderInfo

The information about the provider that is being started.

Returns

Remarks

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

Proizvod Verzije
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0