vSphere PowerCLI Reference

Set-Snapshot

Synopsis

Changes the name and the description of the virtual machine snapshot.

Syntax

Set-Snapshot [-Snapshot] <Snapshot[]> [-Name <String>] [-Description <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Snapshot
New-Snapshot
Remove-Snapshot

Detailed Description

Changes the name and the description of the virtual machine snapshot.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
SnapshotSnapshot[]Specify the snapshot whose properties you want to change.truetrue (ByValue)
ConfirmSwitchParameterIf the value is $true, indicates that the cmdlet asks for confirmation before running. If the value is $false, the cmdlet runs without asking for user confirmation.falsefalse$true
DescriptionStringProvide a new description for the snapshot.falsefalse
NameStringSpecify a new name for the snapshot.falsefalse
WhatIfSwitchParameterIndicate that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falsefalse

Return Type

Snapshot

Notes

Examples

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

Set-Snapshot -Snapshot $snapshot -Name BeforePatch -Description "Before windows update"

Sets the name and the description of the snapshot in the $snapshot variable.

-------------- Example 2 --------------

Get-VM | Get-Snapshot -Name "InitialState" | Set-Snapshot -Description "This snapshot is created right after the OS installation."

Updates the description of all snapshots with name InitialState, from all virtual machines.


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.