Partager via


FileSystemProvider.SetProperty(String, PSObject) Method

Definition

Sets the specified properties on the item at the given path.

public:
 virtual void SetProperty(System::String ^ path, System::Management::Automation::PSObject ^ propertyToSet);
public void SetProperty (string path, System.Management.Automation.PSObject propertyToSet);
override this.SetProperty : string * System.Management.Automation.PSObject -> unit
abstract member SetProperty : string * System.Management.Automation.PSObject -> unit
override this.SetProperty : string * System.Management.Automation.PSObject -> unit
Public Sub SetProperty (path As String, propertyToSet As PSObject)

Parameters

path
String

The path of the item on which to set the properties.

propertyToSet
PSObject

A PSObject which contains a collection of the names and values of the properties to be set. The File System provider supports setting only the "Attributes" property.

Implements

Exceptions

path is null or empty.

propertyToSet is null.

Applies to