Syntax
Set-Snapshot [-Snapshot] <Snapshot[]> [-Description <String>] [-Name <String>] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Online VersionDetailed Description
This cmdlet modifies the name and the description of the specified virtual machine snapshot.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Snapshot | Snapshot[] | Specifies the snapshot whose properties you want to change. | true | True (ByValue) | |
Confirm | SwitchParameter | If 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. | false | False | |
Description | String | Provides a new description for the snapshot. | false | False | |
Name | String | Specifies a new name for the snapshot. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
Zero or more modified Snapshot objectsNotes
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.