Skip to content

Commit

Permalink
Merge pull request #3565 from Xelu86/HyperV_VHDSnapshot_Update
Browse files Browse the repository at this point in the history
Hyper v vhd snapshot update
  • Loading branch information
michaeltlombardi committed Jul 28, 2023
2 parents 1821188 + 87e8052 commit 419ec45
Show file tree
Hide file tree
Showing 2 changed files with 99 additions and 68 deletions.
78 changes: 44 additions & 34 deletions docset/winserver2022-ps/hyper-v/Get-VHDSnapshot.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
description: Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell.
external help file: Microsoft.HyperV.PowerShell.Cmdlets.dll-Help.xml
Module Name: Hyper-V
ms.date: 12/20/2016
ms.date: 06/21/2023
online version: https://learn.microsoft.com/powershell/module/hyper-v/get-vhdsnapshot?view=windowsserver2022-ps&wt.mc_id=ps-gethelp
schema: 2.0.0
title: Get-VHDSnapshot
Expand All @@ -16,35 +16,42 @@ Gets information about a checkpoint in a VHD set.
## SYNTAX

```
Get-VHDSnapshot [-Path] <String[]> [-GetParentPaths] [-SnapshotId <Guid[]>] [-CimSession <CimSession[]>]
[-ComputerName <String[]>] [-Credential <PSCredential[]>] [<CommonParameters>]
Get-VHDSnapshot [-Path] <String[]> [-GetParentPaths] [-SnapshotId <Guid[]>]
[-CimSession <CimSession[]>] [-ComputerName <String[]>] [-Credential <PSCredential[]>]
[<CommonParameters>]
```

## DESCRIPTION
The **Get-VHDSnapshot** cmdlet gets information about a checkpoint in a virtual hard disk (VHD) set file.

The `Get-VHDSnapshot` cmdlet gets information about a checkpoint in a virtual hard disk (VHD) set
file.

Checkpoint replaces the previous term, snapshot.

## EXAMPLES

### Example 1: Get information about a checkpoint
```
PS C:\> Get-VHDSnapshot -Path "Data01.vhds" -SnapshotId 6c87351a-a39a-4581-b231-6d693b26485d

```powershell
Get-VHDSnapshot -Path "Data01.vhds" -SnapshotId 6c87351a-a39a-4581-b231-6d693b26485d
```

This command gets information about the checkpoint that has the specified ID from the VHD set file named Data01.vhds in the current working folder.
This command gets information about the checkpoint that has the specified ID from the VHD set file
named `Data01.vhds` in the current working folder.

## PARAMETERS

### -CimSession
Runs the cmdlet in a remote session or on a remote computer.
Enter a computer name or a session object, such as the output of a [New-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227967) or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet.
The default is the current session on the local computer.

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session
object, such as the output of a [New-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227967)
or [Get-CimSession](https://go.microsoft.com/fwlink/p/?LinkId=227966) cmdlet. The default is the
current session on the local computer.

```yaml
Type: CimSession[]
Parameter Sets: (All)
Aliases:
Aliases:

Required: False
Position: Named
Expand All @@ -54,15 +61,15 @@ Accept wildcard characters: False
```
### -ComputerName
Specifies one or more Hyper-V hosts that run this command.
NetBIOS names, IP addresses, and fully qualified domain names are allowable.
The default is the local computer.
Use localhost or a dot (.) to specify the local computer explicitly.
Specifies one or more Hyper-V hosts that run this command. NetBIOS names, IP addresses, and fully
qualified domain names are allowable. The default is the local computer. Use `localhost` or a dot
(`.`) to specify the local computer explicitly.

```yaml
Type: String[]
Parameter Sets: (All)
Aliases:
Aliases:
Required: False
Position: Named
Expand All @@ -72,13 +79,14 @@ Accept wildcard characters: False
```

### -Credential
Specifies one or more user accounts that have permission to perform this action.
The default is the current user.

Specifies one or more user accounts that have permission to perform this action. The default is the
current user.

```yaml
Type: PSCredential[]
Parameter Sets: (All)
Aliases:
Aliases:
Required: False
Position: Named
Expand All @@ -88,12 +96,13 @@ Accept wildcard characters: False
```

### -GetParentPaths

Gets the paths of all files on which this VHD checkpoint depends.

```yaml
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Aliases:
Required: False
Position: Named
Expand All @@ -103,8 +112,10 @@ Accept wildcard characters: False
```

### -Path
Specifies an array of paths of VHD set files from which this cmdlet gets checkpoints.
If you specify a file name or relative path, the cmdlet determines the full path relative to the current working folder.

Specifies an array of paths of VHD set files from which this cmdlet gets checkpoints. If you specify
a file name or relative path, the cmdlet determines the full path relative to the current working
folder.

```yaml
Type: String[]
Expand All @@ -119,12 +130,13 @@ Accept wildcard characters: False
```

### -SnapshotId

Specifies an array of unique IDs of VHD checkpoints that this cmdlet gets from a VHD set file.

```yaml
Type: Guid[]
Parameter Sets: (All)
Aliases:
Aliases:
Required: False
Position: Named
Expand All @@ -134,26 +146,24 @@ Accept wildcard characters: False
```

### CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see
[about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

### System.String[]

## OUTPUTS

### Microsoft.Vhd.PowerShell.VHDSnapshotInfo

This cmdlet returns a **VHDSnapshotInfo** object.

## NOTES

## RELATED LINKS

[Export-VMSnapshot](./Export-VMSnapshot.md)
[Get-VMSnapshot](./Get-VMSnapshot.md)
[Rename-VMSnapshot](./Rename-VMSnapshot.md)
[Restore-VMSnapshot](./Restore-VMSnapshot.md)
[Get-VHDSet](./Get-VHDSet.md)
- [Remove-VHDSnapshot](remove-vhdsnapshot.md)
Loading

0 comments on commit 419ec45

Please sign in to comment.