ItemCmdletProvider.GetItem(String) Method

Definition

Gets the item at the specified path.

protected:
 virtual void GetItem(System::String ^ path);
protected:
 virtual void GetItem(Platform::String ^ path);
 virtual void GetItem(std::wstring const & path);
protected virtual void GetItem (string path);
abstract member GetItem : string -> unit
override this.GetItem : string -> unit
Protected Overridable Sub GetItem (path As String)

Parameters

path
String

The path to the item to retrieve.

Remarks

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

Providers that declare ProviderCapabilities 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 PSNotSupportedException.

Applies to