< Back
Move-VsphereVm
Post
NAME Move-VsphereVm
SYNOPSIS
Moves a VM to another folder/datastore/resource pool.
SYNTAX
Move-VsphereVm -InputObject <PSObject> [-FolderId <String>] [-HostId <String>] [-DatastoreId <String>]
[-ResourcePoolId <String>] [-DiskProvision {Thick Provision Lazy Zeroed | Thick Provision Eager Zeroed | Thin
Provision}] [-DiskDriveKey <String>] -Connection <Hashtable> [<CommonParameters>]
Move-VsphereVm -VmId <String> [-FolderId <String>] [-HostId <String>] [-DatastoreId <String>] [-ResourcePoolId
<String>] [-DiskProvision {Thick Provision Lazy Zeroed | Thick Provision Eager Zeroed | Thin Provision}]
[-DiskDriveKey <String>] -Connection <Hashtable> [<CommonParameters>]
DESCRIPTION
Moves a VM to another folder/datastore/resource pool.
PARAMETERS
-InputObject <PSObject>
Object representing the VM that is to be moved. Use Get-VsphereObject to retrieve input object.
Required? true
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-FolderId [<String>]
ID (managed object reference) of the folder where the VM is to be moved. When not specified:
??????? If moving within the same datacenter, the VM will keep the same folder.
??????? If moving to another datacenter, the root VM folder of the destination datacenter will be used.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-HostId [<String>]
ID (managed object reference) of the host where the VM is to be moved. If specified, the specified resource
pool and datastore must be accessible from the specified host.
If not specified:
??????? If the Resource Pool is not specified, the current VM host will be used.
??????? If the Resource Pool is specified, and it is associated with a stand-alone host, that host will be used.
??????? If the Resource Pool is specified, and it is associated with a DRS enabled cluster, a host selected by DRS
will be used.
Typically, this parameter is specified when moving the VM to another host in a cluster, where multiple hosts
are associated with the same resource pool. When moving the VM to a stand-alone host, that host is implicitly
specified by the resource pool and this parameter does not have to be specified.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-DatastoreId [<String>]
ID (managed object reference) of the datastore where the VM is to be moved. The specified datastore must be
accessible for the specified resource pool.
??????? If not specified, the current VM datastore will be used.
??????? If not specified and the current VM datastore is not accessible, the activity will fail.
??????? Must be specified when moving the VM to another datacenter.
??????? Must be specified when moving the VM to another host that is not associated with the current VM datastore.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ResourcePoolId [<String>]
ID (managed object reference) of the resource pool where the VM is to be moved. Specifying the resource pool
also implicitly specifies the host (in the case of a stand-alone host), or the cluster.
??????? Must be specified when moving the VM to another datacenter.
??????? Must be specified when moving the VM to another host that is not associated with the current VM resource
pool.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-DiskProvision [<String>]
Specifies provisioning for the moved VM disk(s). If Disk Drive Key is not specified, the specified
provisioning will be applied to all VM disks. Acceptable values are:
Thick Provision Lazy Zeroed
Thick Provision Eager Zeroed
Thin Provision
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-DiskDriveKey [<String>]
Identifies the VM disk(s) for which DiskProvision is to be applied. If not specified, DiskProvision will be
applied to all VM disks. To specify multiple disks, use a comma (,) separated list of drive keys.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Connection <Hashtable>
Specifies connection information to the vCenter server. For example:
@{ServerUrl='<vCenter Server URL>';User='<user>';Password='<password>';LicenseKey=<license
key>;SkipCertificateValidation=$false}
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-VmId <String>
ID (managed object reference) of the VM that is to be moved.
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Management.Automation.PSObject
OUTPUTS
System.String
ID (managed object reference) of the moved VM.
RELATED LINKS
SYNOPSIS
Moves a VM to another folder/datastore/resource pool.
SYNTAX
Move-VsphereVm -InputObject <PSObject> [-FolderId <String>] [-HostId <String>] [-DatastoreId <String>]
[-ResourcePoolId <String>] [-DiskProvision {Thick Provision Lazy Zeroed | Thick Provision Eager Zeroed | Thin
Provision}] [-DiskDriveKey <String>] -Connection <Hashtable> [<CommonParameters>]
Move-VsphereVm -VmId <String> [-FolderId <String>] [-HostId <String>] [-DatastoreId <String>] [-ResourcePoolId
<String>] [-DiskProvision {Thick Provision Lazy Zeroed | Thick Provision Eager Zeroed | Thin Provision}]
[-DiskDriveKey <String>] -Connection <Hashtable> [<CommonParameters>]
DESCRIPTION
Moves a VM to another folder/datastore/resource pool.
PARAMETERS
-InputObject <PSObject>
Object representing the VM that is to be moved. Use Get-VsphereObject to retrieve input object.
Required? true
Position? named
Default value
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-FolderId [<String>]
ID (managed object reference) of the folder where the VM is to be moved. When not specified:
??????? If moving within the same datacenter, the VM will keep the same folder.
??????? If moving to another datacenter, the root VM folder of the destination datacenter will be used.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-HostId [<String>]
ID (managed object reference) of the host where the VM is to be moved. If specified, the specified resource
pool and datastore must be accessible from the specified host.
If not specified:
??????? If the Resource Pool is not specified, the current VM host will be used.
??????? If the Resource Pool is specified, and it is associated with a stand-alone host, that host will be used.
??????? If the Resource Pool is specified, and it is associated with a DRS enabled cluster, a host selected by DRS
will be used.
Typically, this parameter is specified when moving the VM to another host in a cluster, where multiple hosts
are associated with the same resource pool. When moving the VM to a stand-alone host, that host is implicitly
specified by the resource pool and this parameter does not have to be specified.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-DatastoreId [<String>]
ID (managed object reference) of the datastore where the VM is to be moved. The specified datastore must be
accessible for the specified resource pool.
??????? If not specified, the current VM datastore will be used.
??????? If not specified and the current VM datastore is not accessible, the activity will fail.
??????? Must be specified when moving the VM to another datacenter.
??????? Must be specified when moving the VM to another host that is not associated with the current VM datastore.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-ResourcePoolId [<String>]
ID (managed object reference) of the resource pool where the VM is to be moved. Specifying the resource pool
also implicitly specifies the host (in the case of a stand-alone host), or the cluster.
??????? Must be specified when moving the VM to another datacenter.
??????? Must be specified when moving the VM to another host that is not associated with the current VM resource
pool.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-DiskProvision [<String>]
Specifies provisioning for the moved VM disk(s). If Disk Drive Key is not specified, the specified
provisioning will be applied to all VM disks. Acceptable values are:
Thick Provision Lazy Zeroed
Thick Provision Eager Zeroed
Thin Provision
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-DiskDriveKey [<String>]
Identifies the VM disk(s) for which DiskProvision is to be applied. If not specified, DiskProvision will be
applied to all VM disks. To specify multiple disks, use a comma (,) separated list of drive keys.
Required? false
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-Connection <Hashtable>
Specifies connection information to the vCenter server. For example:
@{ServerUrl='<vCenter Server URL>';User='<user>';Password='<password>';LicenseKey=<license
key>;SkipCertificateValidation=$false}
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
-VmId <String>
ID (managed object reference) of the VM that is to be moved.
Required? true
Position? named
Default value
Accept pipeline input? False
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
System.Management.Automation.PSObject
OUTPUTS
System.String
ID (managed object reference) of the moved VM.
RELATED LINKS