powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Get-Snapshot



NAME
Get-Snapshot

SYNOPSIS
Retrieves the virtual machine snapshots available on a vSphere server.

SYNTAX
Get-Snapshot [[-Name] ] [-Id ] [-VM] [-Server ] [ rs>]


DESCRIPTION
Returns information about the snapshots that correspond to the filter criteria provided by the Name and VM paramete
rs. The disk size of the snapshots is retrieved only if you have the "Datastore/Browse datastore" privilege to the
datastore where the shapshot is located. Otherwise, the following message is displayed: "Unable to populate snapsh
ot size due to unsiffucient permissions."


PARAMETERS
-Name
Specify the names of the snapshots you want to retrieve.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? true

-Id
Specify the Ids of the snapshots you want to retrieve.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true

-VM
Specify the virtual machines whose snapshots you want to retrieve. The position of this parameter is deprecated
and will be changed in a future release. To avoid errors when you run existing scripts on future PowerCLI vers
ions, specify the parameter by name.

Required? true
Position? 1
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? true


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
Snapshot


NOTES




-------------- Example 1 --------------

C:\PS>Get-Snapshot -VM VM -Name 'Before ServicePack 2'


Retrieves the snapshot named "Before ServicePack2" of the VM virtual machine.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Get-Snapshot.html
New-Snapshot
Remove-Snapshot
Set-Snapshot