PowerCLI Reference

Remove-Snapshot

Synopsis

This cmdlet 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

This cmdlet 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[]Specifies 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
RemoveChildrenSwitchParameterIndicates that you want to remove the children of the specified snapshots as well.falsefalse
RunAsyncSwitchParameterIndicates 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 VMware PowerCLI console.falsefalse
WhatIfSwitchParameterIndicates 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 © VMware, Inc. All rights reserved.