Property Cmdlet Provider. Rename Property(String, String, String) Method
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.
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)
The path to the item on which to rename the property.
The property to rename.
The new name of the property.
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.