Clone a VM from a Snapshot using PowerCLI
  • PowerShell 100%
Find a file
Michael Kleger a75a3c5df4 Add new file
2016-08-03 09:18:46 +02:00
README.md Add new file 2016-08-03 09:18:29 +02:00
VMwareCloneVMFromSnapshot.ps1 Add new file 2016-08-03 09:18:46 +02:00

Clone a VM from a Snapshot using PowerCLI

.SYNOPSIS
 Function to create a clone from a snapshot of a VM.

 .DESCRIPTION
 Function to create a clone from a snapshot of a VM.

 .PARAMETER SourceVM
 VM to clone from.

.PARAMETER CloneName
 Name of the clone to create

.PARAMETER SnapshotName
 Name of the snapshot to clone from

.PARAMETER CurrentSnapshot
 Use the current snapshot instead of a named snapshot

.PARAMETER Cluster
 Name of the cluster to place the clone in

.PARAMETER Datastore
 Name of the datastore to place the clone in

.PARAMETER VMFolder
 Name of the Virtual Machine folder to put the VM in

.PARAMETER LinkedClone
 Create a linked clone from the snapshot, rather than a full clone

.INPUTS
 String.
 System.Management.Automation.PSObject.

.OUTPUTS
 VMware.Vim.ManagedObjectReference.

.EXAMPLE
 PS> New-VMFromSnapshot -SourceVM VM01 -CloneName "Clone01" -Cluster "Test Cluster" -Datastore "Datastore01"

.EXAMPLE
 PS> New-VMFromSnapshot -SourceVM VM01 -CloneName "Clone01" -SnapshotName "Testing" -Cluster "Test Cluster" -Datastore "Datastore01" -VMFolder "Test Clones" -LinkedClone