IPropertyCmdletProvider.SetProperty(String, PSObject) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Sets the specified properties of the item at the specified path.
public:
void SetProperty(System::String ^ path, System::Management::Automation::PSObject ^ propertyValue);
public void SetProperty (string path, System.Management.Automation.PSObject propertyValue);
abstract member SetProperty : string * System.Management.Automation.PSObject -> unit
Public Sub SetProperty (path As String, propertyValue As PSObject)
Parameters
- path
- String
The path to the item to set the properties on.
- propertyValue
- PSObject
A PSObject which contains a collection of the name, type, value of the properties to be set.
Remarks
Providers override this method to give the user the ability to set the value of provider object properties using the set-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. propertyValue
is a property bag containing the properties that should be set. See PSObject for more information.