ItemCmdletProvider.GetItem Method


Gets the item at the specified path.

protected virtual void GetItem (string path);

The path to the item to retrieve.


Providers override this method to give the user access to the provider objects using the get-item and get-childitem cmdlets.

        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 write objects that are generally hidden from 
        the user unless the Force property is set to true. For instance, the FileSystem provider should
        not call WriteItemObject for hidden or system files unless the Force property is set to true. 

        The default implementation of this method throws an <xref href="System.Management.Automation.PSNotSupportedException"></xref>.