CmdletProvider CmdletProvider CmdletProvider Class

Definition

Defines the base class for all of the classes the provide implementations for a particular data store or item for the MSH core commands.

public abstract class CmdletProvider : System.Management.Automation.IResourceSupplier
type CmdletProvider = class
    interface IResourceSupplier
Public MustInherit Class CmdletProvider
Implements IResourceSupplier
Inheritance
CmdletProviderCmdletProviderCmdletProvider
Derived
Implements

Remarks

Although it is possible to derive from this base class to implement a Cmdlet Provider, in most cases one should derive from ItemCmdletProvider, ContainerCmdletProvider, or NavigationCmdletProvider

Constructors

CmdletProvider() CmdletProvider() CmdletProvider()

Properties

Credential Credential Credential

Gets the credentials under which the operation should run.

CurrentPSTransaction CurrentPSTransaction CurrentPSTransaction

Gets an object that surfaces the current PowerShell transaction. When this object is disposed, PowerShell resets the active transaction

DynamicParameters DynamicParameters DynamicParameters

The dynamic parameters object populated with the values as specified by the user.

Exclude Exclude Exclude

Gets the exclude wildcard patterns which is used to determine which items will be excluded when taking an action.

Filter Filter Filter

Gets the provider specific filter that was supplied by the caller.

Force Force Force

Gets the force property.

Host Host Host

Gets the host interaction APIs.

Include Include Include

Gets the include wildcard patterns which is used to determine which items will be included when taking an action.

InvokeCommand InvokeCommand InvokeCommand

Gets the instance of the command invocation APIs for the current runspace.

InvokeProvider InvokeProvider InvokeProvider

Gets the instance of the provider interface APIs for the current runspace.

ProviderInfo ProviderInfo ProviderInfo

The information about the provider that is stored in the runspace on behalf of the provider.

PSDriveInfo PSDriveInfo PSDriveInfo

The drive information associated with the context of the current operation.

SessionState SessionState SessionState

Gets the instance of session state for the current runspace.

Stopping Stopping Stopping

Indicates whether stop has been requested on this provider.

Methods

GetResourceString(String, String) GetResourceString(String, String) GetResourceString(String, String)

Gets the resource string corresponding to baseName and resourceId from the current assembly. You should override this if you require a different behavior.

ShouldContinue(String, String) ShouldContinue(String, String) ShouldContinue(String, String)
ShouldContinue(String, String, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean) ShouldContinue(String, String, Boolean, Boolean)
ShouldProcess(String, String, String, ShouldProcessReason) ShouldProcess(String, String, String, ShouldProcessReason) ShouldProcess(String, String, String, ShouldProcessReason)
ShouldProcess(String, String, String) ShouldProcess(String, String, String) ShouldProcess(String, String, String)
ShouldProcess(String, String) ShouldProcess(String, String) ShouldProcess(String, String)
ShouldProcess(String) ShouldProcess(String) ShouldProcess(String)
Start(ProviderInfo) Start(ProviderInfo) Start(ProviderInfo)

Gives the provider the opportunity to initialize itself.

StartDynamicParameters() StartDynamicParameters() StartDynamicParameters()

Gets an object that defines the additional parameters for the Start implementation for a provider.

Stop() Stop() Stop()

Called by session state when the provider is being removed.

StopProcessing() StopProcessing() StopProcessing()
ThrowTerminatingError(ErrorRecord) ThrowTerminatingError(ErrorRecord) ThrowTerminatingError(ErrorRecord)
TransactionAvailable() TransactionAvailable() TransactionAvailable()

Returns true if a transaction is available and active.

WriteDebug(String) WriteDebug(String) WriteDebug(String)
WriteError(ErrorRecord) WriteError(ErrorRecord) WriteError(ErrorRecord)
WriteInformation(InformationRecord) WriteInformation(InformationRecord) WriteInformation(InformationRecord)
WriteInformation(Object, String[]) WriteInformation(Object, String[]) WriteInformation(Object, String[])
WriteItemObject(Object, String, Boolean) WriteItemObject(Object, String, Boolean) WriteItemObject(Object, String, Boolean)

Writes an item to the output as a PSObject with extra data attached as notes.

WriteProgress(ProgressRecord) WriteProgress(ProgressRecord) WriteProgress(ProgressRecord)
WritePropertyObject(Object, String) WritePropertyObject(Object, String) WritePropertyObject(Object, String)

Writes a property object to the output as a PSObject with extra data attached as notes.

WriteSecurityDescriptorObject(ObjectSecurity, String) WriteSecurityDescriptorObject(ObjectSecurity, String) WriteSecurityDescriptorObject(ObjectSecurity, String)

Writes a Security Descriptor object to the output as a PSObject with extra data attached as notes.

WriteVerbose(String) WriteVerbose(String) WriteVerbose(String)
WriteWarning(String) WriteWarning(String) WriteWarning(String)

Applies to