Compartilhar via


PropertyCmdletProviderIntrinsics.Move Method

Definition

Overloads

Move(String, String, String, String)

Moves a property on the specified item(s)

Move(String[], String, String, String, Boolean, Boolean)

Moves a property on the specified item(s)

Move(String, String, String, String)

Moves a property on the specified item(s)

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

Parameters

sourcePath
String

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

sourceProperty
String

The source name of the property to be moved.

destinationPath
String

The path to the item(s) to move the property to. It can be the same as the sourcePath as long as the destinationProperty is different.

destinationProperty
String

The new name of the property.

Returns

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

Exceptions

If sourcePath, sourceProperty, destinationPath, or destinationProperty is null.

If destinationPath resolves to more than one item.

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

If the sourcePath 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 sourcePath refers to does not support this operation.

If the provider threw an exception.

Applies to

Move(String[], String, String, String, Boolean, Boolean)

Moves a property on the specified item(s)

public:
 System::Collections::ObjectModel::Collection<System::Management::Automation::PSObject ^> ^ Move(cli::array <System::String ^> ^ sourcePath, System::String ^ sourceProperty, System::String ^ destinationPath, System::String ^ destinationProperty, bool force, bool literalPath);
public System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject> Move (string[] sourcePath, string sourceProperty, string destinationPath, string destinationProperty, bool force, bool literalPath);
member this.Move : string[] * string * string * string * bool * bool -> System.Collections.ObjectModel.Collection<System.Management.Automation.PSObject>
Public Function Move (sourcePath As String(), sourceProperty As String, destinationPath As String, destinationProperty As String, force As Boolean, literalPath As Boolean) As Collection(Of PSObject)

Parameters

sourcePath
String[]

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

sourceProperty
String

The source name of the property to be moved.

destinationPath
String

The path to the item(s) to move the property to. It can be the same as the sourcePath as long as the destinationProperty is different.

destinationProperty
String

The new name of the property.

force
Boolean

Passed on to providers to force operations.

literalPath
Boolean

If true, globbing is not done on paths.

Returns

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

Exceptions

If sourcePath, sourceProperty, destinationPath, or destinationProperty is null.

If destinationPath resolves to more than one item.

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

If the sourcePath 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 sourcePath refers to does not support this operation.

If the provider threw an exception.

Applies to