ItemCmdletProvider.InvokeDefaultAction Method

Definition

Invokes the default action on the specified item.

protected virtual void InvokeDefaultAction (string path);
Parameters
path
String

The path to the item to perform the default action on.

Remarks

The default implemenation does nothing.

        Providers override this method to give the user the ability to invoke provider objects using
        the invoke-item cmdlet. Think of the invocation as a double click in the Windows Shell. This
        method provides a default action based on the path that was passed.

        Providers that declare <xref href="System.Management.Automation.Provider.ProviderCapabilities"></xref>
        of ExpandWildcards, Filter, Include, or Exclude should ensure that the path passed meets those
        requirements by accessing the appropriate property from the base class.

        By default overrides of this method should not invoke objects that are generally hidden from 
        the user unless the Force property is set to true. An error should be sent to the WriteError method if
        the path represents an item that is hidden from the user and Force is set to false.