PropertyCmdletProviderIntrinsics.Rename PropertyCmdletProviderIntrinsics.Rename PropertyCmdletProviderIntrinsics.Rename Method

Definition

Overloads

Rename(String, String, String) Rename(String, String, String) Rename(String, String, String)

Renames a property on the specified item(s)

Rename(String[], String, String, Boolean, Boolean) Rename(String[], String, String, Boolean, Boolean) Rename(String[], String, String, Boolean, Boolean)

Renames a property on the specified item(s)

Rename(String, String, String) Rename(String, String, String) Rename(String, String, String)

Renames a property on the specified item(s)

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Rename (string path, string sourceProperty, string destinationProperty);
member this.Rename : string * string * string -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Rename (path As String, sourceProperty As String, destinationProperty As String) As Collection(Of PSObject)
Parameters
path
String String String

The path to the item(s) on which the property should be renamed.

sourceProperty
String String String

The source name of the property to be renamed.

destinationProperty
String String String

The new name of the property.

Returns

A PSObject for each item that is the new property after the rename.

Exceptions

If path, sourceProperty, or destinationProperty is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

Rename(String[], String, String, Boolean, Boolean) Rename(String[], String, String, Boolean, Boolean) Rename(String[], String, String, Boolean, Boolean)

Renames a property on the specified item(s)

public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Rename (string[] path, string sourceProperty, string destinationProperty, bool force, bool literalPath);
member this.Rename : string[] * string * string * bool * bool -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Rename (path As String(), sourceProperty As String, destinationProperty As String, force As Boolean, literalPath As Boolean) As Collection(Of PSObject)
Parameters
path
String[]

The path(s) to the item(s) on which the property should be renamed.

sourceProperty
String String String

The source name of the property to be renamed.

destinationProperty
String String String

The new name of the property.

force
Boolean Boolean Boolean

Passed on to providers to force operations.

literalPath
Boolean Boolean Boolean

If true, globbing is not done on paths.

Returns

A PSObject for each item that is the new property after the rename.

Exceptions

If path, sourceProperty, or destinationProperty is null.

If the path refers to a provider that could not be found.

If the path refers to a drive that could not be found.

If path does not contain glob characters and could not be found.

If the provider that the path refers to does not support this operation.

Applies to