Export (0) Print
Expand All
Expand Minimize

Get-VMSnapshot

Windows Server 2012 R2 and Windows 8.1

Updated: June 10, 2014

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Get-VMSnapshot

Gets the checkpoints associated with a virtual machine or checkpoint.

Syntax

Parameter Set: Child
Get-VMSnapshot [[-Name] <String> ] -ChildOf <VMSnapshot> [-SnapshotType <SnapshotType> ] [ <CommonParameters>]

Parameter Set: Id
Get-VMSnapshot [-Id] <Guid> [-ComputerName <String[]> ] [ <CommonParameters>]

Parameter Set: Parent
Get-VMSnapshot [[-Name] <String> ] -ParentOf <VirtualMachineBase> [-SnapshotType <SnapshotType> ] [ <CommonParameters>]

Parameter Set: VMName
Get-VMSnapshot [-VMName] <String[]> [[-Name] <String> ] [-ComputerName <String[]> ] [-SnapshotType <SnapshotType> ] [ <CommonParameters>]

Parameter Set: VMObject
Get-VMSnapshot [-VM] <VirtualMachine[]> [[-Name] <String> ] [-SnapshotType <SnapshotType> ] [ <CommonParameters>]




Detailed Description

The Get-VMSnapshot cmdlet gets the checkpoints associated with a virtual machine or checkpoint.

Note: In Windows Server 2012 R2, virtual machine snapshots were renamed to virtual machine checkpoints. For clarity, this document will refer to virtual machine snapshots as checkpoints.

Parameters

-ChildOf<VMSnapshot>

Specifies the checkpoint whose child checkpoints are to be retrieved. This retrieves immediate children only.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ComputerName<String[]>

Specifies one or more Hyper-V hosts on which checkpoints are to be retrieved. NetBIOS names, IP addresses, and fully-qualified domain names are allowable. The default is the local computer — use “localhost” or a dot (“.”) to specify the local computer explicitly.


Aliases

none

Required?

false

Position?

named

Default Value

.

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Id<Guid>

Specifies the unique identifier of the virtual machine whose checkpoints are to be retrieved.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Name<String>

Specifies the name of the checkpoint to be retrieved.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ParentOf<VirtualMachineBase>

Specifies the checkpoint whose immediate parent checkpoint is to be retrieved.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SnapshotType<SnapshotType>

Specifies the type of the checkpoints to be retrieved. Allowed values are Standard, Recovery, Planned, Missing, Replica, AppConsistentReplica, and SyncedReplica.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VM<VirtualMachine[]>

Specifies the virtual machine whose checkpoints are to be retrieved.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-VMName<String[]>

Specifies the name of the virtual machine whose checkpoints are to be retrieved.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.HyperV.PowerShell.Snapshot

Examples

Example 1

Gets all checkpoints of virtual machine TestVM.


PS C:\> Get-VMSnapshot –VMName TestVM

Example 2

Gets all standard checkpoints of virtual machine TestVM.


PS C:\> Get-VM –Name TestVM | Get-VMSnapshot –SnapshotType Standard

Example 3

Gets the immediate parent of checkpoint Before applying updates of virtual machine TestVM.


 

PS C:\> $snapshot = Get-VMSnapshot –Name 'Before applying updates' –VMName TestVM

 

PS C:\> Get-VMSnapshot –ParentOf $snapshot

Example 4

Gets the immediate child checkpoints of checkpoint Before applying updates of virtual machine TestVM.


 

PS C:\> $snapshot = Get-VMSnapshot –Name 'Before applying updates' –VMName TestVM

 

PS C:\> Get-VMSnapshot –ChildOf $snapshot

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft