Syntax
Copy-HardDisk [-HardDisk] <HardDisk[]> [-DestinationPath] <String> [-DestinationStorageFormat <VirtualDiskStorageFormat>] [-Force] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]Related Commands
Online versionDetailed Description
Copies a virtual hard disk to another destination specified by the DestinationPath parameter. DestinationPath must be a datastore path to the destination folder.Parameters
Return Type
HardDiskNotes
Supported only on ESX 3.5 and higher.Examples
-------------- Example 1 --------------
Get-HardDisk -VM $vm | Copy-HardDisk "[Storage1]/"
Retrieves the hard disks of a virtual machine and copies them into the storage1 root folder.
-------------- Example 2 --------------
Copy-HardDisk -HardDisk $hdd -DestinationPath "[Storage1] vms/disks" -DestinationStorageFormat Thick
Copies the $hdd hard disk to the "vms/disks"location on storage1 and changes the storage format of the destination disk to Thick.