Loading...

Restore-CVVirtualMachine

The Restore-CVVirtualMachine cmdlet performs recovery operations for VMs in your CommCell environment.

Before you can use this cmdlet, you must log on to your CommCell environment using the Connect-CVServer cmdlet. For more information, see Connecting to a CommCell Environment with PowerShell.

Syntax

Restore-CVVirtualMachine -Name <String> -ClientName <String> [-SubclientName <String>] [-JobId <Int32>] [-CopyPrecedence {Primary | Secondary | Cloud}] [-DestHypervisorType {vmware | hyperv}] [-OutofPlace] [-PowerOnAfterRestore] [-OverwriteExisting] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-CVVirtualMachine -Id <String> [-SubclientName <String>] [-JobId <Int32>] [-CopyPrecedence {Primary | Secondary | Cloud}] [-DestHypervisorType {vmware | hyperv}] [-OutofPlace] [-PowerOnAfterRestore] [-OverwriteExisting] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Restore-CVVirtualMachine -ClientObject <Object> [-SubclientName <String>] [-JobId <Int32>] [-CopyPrecedence {Primary | Secondary | Cloud}] [-DestHypervisorType {vmware | hyperv}] [-OutofPlace] [-PowerOnAfterRestore] [-OverwriteExisting] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]

Required Parameters

Parameter

Description

Data type

Accepts pipeline input?

Accepts wildcard characters?

Type of parameter

–Id

The ID of the source VM that represents the VM GUID.

String

No

No

Named

–Name

The name of the source VM.

String

No

No

Named

–ClientName

The name of the client that the source VM is associated with.

String

No

No

Named

–ClientObject

The object that represents the client that the source VM is associated with.

Object

Yes, by:

  • Value
  • Property name

No

Named

Optional Parameters

Commvault Parameters

Parameter

Description

Data type

Values

Accepts pipeline input?

Accepts wildcard characters?

Type of parameter

-SubclientName

The name of the subclient.

This parameter overrides the default behavior.

String

 

No

No

Named

-JobId

The ID of the backup job to use for the restore.

String

The default value is 0.

No

No

Named

-CopyPrecedence

The copy precedence of the backup to use for the restore.

String

Valid values:

  • Primary (default)
  • Secondary
  • Cloud

No

No

Named

-DestHypervisorType

The destination hypervisor type.

For an out-of-place restore to Hyper-V, you must provide this parameter on the command line.

Enumerated

Valid values:

  • Vmware (default)
  • Hyperv

No

No

Named

-OutofPlace

Creates an out-of-place virtual machine restore.

SwitchParameter

 

No

No

Named

-PowerOnAfterRestore

Powers on the VM after the restore.

SwitchParameter

 

No

No

Named

-OverwriteExisting

Overwrites the existing VM or database.

SwitchParameter

 

No

No

Named

Microsoft PowerShell Parameters

You can use the following Microsoft PowerShell parameters:

  • Debug
  • ErrorAction
  • ErrorVariable
  • OutBuffer
  • OutVariable
  • PipelineVariable
  • Verbose
  • WarningAction
  • WarningVariable
  • Force
  • Confirm
  • WhatIf

Note: Only a few cmdlets support Force, Confirm, and WhatIf parameters.

For more information, see "About Common Parameters" in the Microsoft PowerShell documentation.

Input

This cmdlet does not support input.

Output

A message that indicates whether the restore completed successfully.

Example

The following example performs a recovery operation from the most recent backup of a VM to the same client in your CommCell environment.

Restore-CVVirtualMachine -Name TESTVM12 -ClientName VSAQAVCDR.vsatest.commvault.com -SubclientName VMGroup1 -PowerOnAfterRestore -OverwriteExisting

Last modified: 10/30/2020 4:29:21 AM