Note
Access to this page requires authorization. You can try signing in or .
Access to this page requires authorization. You can try .
Checkpoint-VM
- Module:
- Hyper-V Module
Creates a checkpoint of a virtual machine.
Syntax
Name (Default)
Checkpoint-VM
[-Name] <String[]>
[[-SnapshotName] <String>]
[-CimSession <CimSession[]>]
[-ComputerName <String[]>]
[-Credential <PSCredential[]>]
[-AsJob]
[-Passthru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
VMObject
Checkpoint-VM
[-VM] <VirtualMachine[]>
[[-SnapshotName] <String>]
[-AsJob]
[-Passthru]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Checkpoint-VM cmdlet creates a checkpoint of a virtual machine.
Note: In Windows Server 2012 R2, virtual machine snapshots were renamed to virtual machine checkpoints. For clarity, this document will refer to virtual machine snapshots as checkpoints.
Examples
Example 1
PS C:\> Checkpoint-VM -Name Test -SnapshotName BeforeInstallingUpdates
Checkpoints virtual machine Test, creating a checkpoint of it named BeforeInstallingUpdates.
Example 2
PS C:\> Get-VM Test -ComputerName Server1 | Checkpoint-VM
Checkpoints virtual machine Test on Hyper-V host Server1.
Parameters
-AsJob
Runs the cmdlet as a background job.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-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 or Get-CimSession cmdlet. The default is the current session on the local computer.
Parameter properties
| Type: | CimSession[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-ComputerName
Specifies one or more virtual machine hosts on which the virtual machine checkpoint is to be created. 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.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Confirm
Prompts you for confirmation before running the cmdlet.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | cf |
Parameter sets
-Credential
Specifies one or more user accounts that have permission to perform this action. The default is the current user.
Parameter properties
| Type: | PSCredential[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-Name
Specifies the name of the virtual machine of which a checkpoint is to be taken.
Parameter properties
| Type: | String[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | VMName |
Parameter sets
-Passthru
Specifies that an object is to be passed through to the pipeline representing the virtual machine of which a checkpoint is to be taken.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-SnapshotName
Specifies the name of the checkpoint to be taken. If not provided, a combination of the virtual machine's name and a current timestamp is used.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | CheckpointName |
Parameter sets
-VM
Specifies the virtual machine of which a checkpoint is to be taken.
Parameter properties
| Type: | VirtualMachine[] |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
| Type: | SwitchParameter |
| Default value: | False |
| Supports wildcards: | False |
| DontShow: | False |
| Aliases: | wi |
Parameter sets
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
None
By default, this cmdlet doesn't return any output.
Microsoft.HyperV.PowerShell.Snapshot
When you use the PassThru parameter, this cmdlet returns a Microsoft.HyperV.PowerShell.Snapshot object.
Feedback
Was this page helpful?
