Partager via


IDynamicPropertyCmdletProvider.RenameProperty(String, String, String) Method

Definition

Renames a property of the item at the specified path.

public:
 void RenameProperty(System::String ^ path, System::String ^ sourceProperty, System::String ^ destinationProperty);
public:
 void RenameProperty(Platform::String ^ path, Platform::String ^ sourceProperty, Platform::String ^ destinationProperty);
void RenameProperty(std::wstring const & path, std::wstring const & sourceProperty, std::wstring const & destinationProperty);
public void RenameProperty (string path, string sourceProperty, string destinationProperty);
abstract member RenameProperty : string * string * string -> unit
Public Sub RenameProperty (path As String, sourceProperty As String, destinationProperty As String)

Parameters

path
String

The path to the item on which to rename the property.

sourceProperty
String

The property to rename.

destinationProperty
String

The new name of the property.

Remarks

Providers override this method to give the user the ability to rename properties of provider objects using the rename-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 rename properties on 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.

Applies to