Using the Cmdlets : Cloning VPGs
  
Cloning VPGs
You can clone the virtual machines in a VPG using the Clone-VPG cmdlet. One of the parameters required to clone a VPG is the checkpoint to use for the cloned virtual machines. You use the Get-CheckPoint cmdlet to get the list of checkpoints and then select a specific checkpoint from the returned list to use with the Clone-VPG cmdlet.
To clone a VPG:
1. Run the Get-CheckPoint cmdlet from the PowerShell prompt saving the result in a list.
PS C:\Users\Administrators> $cp_list = Get-CheckPoints 172.18.206.10 9080 -Username a
-Password a -VirtualProtectionGroup ’billing’
The list of checkpoints is written to the variable $cp_list.
2. Extract the last checkpoint from the list.
PS C:\Users\Administrators> $last_cp = $cp_list[$cp_list.Count-1]
Note: The list of checkpoints is zero-based, so the last checkpoint is the total count minus one.
3. Run the Clone-VPG cmdlet to start the clone operation.
PS C:\Users\Administrators> Clone-VPG 172.18.206.10 9080 a a
-VirtualProtectionGroup ’billing’ -Checkpoint $last_cp -Datastore storage1
Note: You cannot prompt for the checkpoint since the prompt accepts strings or integers and the Checkpoint parameter value is neither. In order to use the cmdlet prompts, you can use either the CheckpointDateTime or CheckpointID parameters in the command line.
After the Clone-VPG cmdlet completes, returning the command task identifier and site identifier, some time might still be needed before the VPG is fully cloned. You can monitor the progress in the vSphere Client console.
Note: You can see the details of the last checkpoint by specifying the variable, which returns its contents: