vSphere PowerCLI Reference

Remove-Snapshot

Synopsis

Removes the specified virtual machine snapshots.

Syntax

Remove-Snapshot [-Snapshot] <Snapshot[]> [-RemoveChildren] [-RunAsync] [-WhatIf] [-Confirm] [<CommonParameters>]

Related Commands

Online version
Get-Snapshot
New-Snapshot
Set-Snapshot

Detailed Description

Removes the specified virtual machine snapshots. If the value of the RemoveChildren parameter is $true, the cmdlet removes the child snapshots as well.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
SnapshotSnapshot[]Specify the snapshots you want to remove.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
RemoveChildrenSwitchParameterIndicate that you want to remove the children of the specified snapshots as well.falsefalse
RunAsyncSwitchParameterIndicate that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync" in the vSphere PowerCLI console.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

None

Notes

Examples

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

Remove-Snapshot -Snapshot $snapshot1 -RemoveChildren

Removes the snapshot in the $snapshot variable and its children.


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