ItemCmdletProvider.GetItem(String) Method


Gets the item at the specified path.

 virtual void GetItem(System::String ^ path);
 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)



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 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