Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ContainerCmdletProvider.RenameItem Method (String, String)

 

Updated: April 27, 2016

Applies To: Windows PowerShell

Renames the item at the specified path.

Namespace:   System.Management.Automation.Provider
Assembly:  System.Management.Automation (in System.Management.Automation.dll)

protected virtual void RenameItem(
	string path,
	string newName
)

Parameters

path
Type: System.String

The path to the item to be renamed.

newName
Type: System.String

The new name for the item. This name should always be relative to the parent container.

When implementing this method, do not perform a move operation. This method should only change the name of an item without changing the container it is located in.

This method defines provider-specific functionality for the Rename-Item cmdlet. If this implementation of the cmdlet requires additional parameters, the provider must also implement the RenameItemDynamicParameters method.

For more information about implementing providers (including samples), see Writing a Windows PowerShell Provider.

Return to top

Community Additions

Show: