PowerCLI Reference

Remove-Snapshot

Synopsis

This cmdlet removes the specified virtual machine snapshots.

Syntax

Remove-Snapshot [-Snapshot] <Snapshot[]> [-RemoveChildren] [-RunAsync] [-Confirm] [-WhatIf] [<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.