共用方式為


IPropertyCmdletProvider.GetProperty(String, Collection<String>) Method

Definition

Gets the properties of the item specified by the path.

public:
 void GetProperty(System::String ^ path, System::Collections::ObjectModel::Collection<System::String ^> ^ providerSpecificPickList);
public void GetProperty (string path, System.Collections.ObjectModel.Collection<string> providerSpecificPickList);
public void GetProperty (string path, System.Collections.ObjectModel.Collection<string>? providerSpecificPickList);
abstract member GetProperty : string * System.Collections.ObjectModel.Collection<string> -> unit
Public Sub GetProperty (path As String, providerSpecificPickList As Collection(Of String))

Parameters

path
String

The path to the item to retrieve properties from.

providerSpecificPickList
Collection<String>

A list of properties that should be retrieved. If this parameter is null or empty, all properties should be retrieved.

Remarks

Providers override this method to give the user the ability to add properties to provider objects using the get-itemproperty cmdlet.

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 retrieve properties from 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.

An PSObject can be used as a property bag for the properties that need to be returned if the providerSpecificPickList contains multiple properties to write.

Applies to