Move-Datastore

This cmdlet moves datastores from one location to another.

Syntax

[-Destination]  <VIObject>
-Datastore  <Datastore[]>
[-Server  <VIServer[]>]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Destination
VIObject 1 Specifies a datastore cluster, folder, or datacenter where you want to place the datastore.
required
Datastore
Datastore[] named
  • pipeline
  • Specifies the datastore that you want to move.
    optional
    Server
    VIServer[] named Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer.

    Output

    VMware.VimAutomation.ViCore.Types.V1.DatastoreManagement.Datastore

    Examples


    Example 1

    Move-Datastore "MyDatastore" -Destination "MyDatastoreFolder"

    Moves the MyDatastore datastore to the specified folder.

    Example 2

    $myDatastoreCluster = Get-DatastoreCluster -Name "MyDatatoreCluster"
    Get-Datastore "MyDatastore1", "MyDatastore2" | Move-Datstore -Destination $myDatastoreCluster

    Moves two datastores to a specified datastore cluster.

    Related Commands

    Feedback

    Was this page helpful?