Start-WBHyperVRecovery

Start-WBHyperVRecovery

Starts recovery of a virtual machine.

Syntax

Parameter Set: Default
Start-WBHyperVRecovery [-BackupSet] <WBBackupSet> [-VMInBackup] <WBVirtualMachine[]> [[-TargetPath] <String> ] [[-NoRollForward]] [[-Async]] [[-Force]] [[-UseAlternateLocation]] [[-RecreatePath]] [ <CommonParameters>]

Detailed Description

The Start-WBHyperVRecovery cmdlet starts a recovery operation for a virtual machine (VM). Use the application array from a WBBackupSet object to specify the VMs that you want to recover.

For an overview of , see HyperV Overview (https://technet.microsoft.com/en-us/library/hh831531.aspx) on TechNet.

Parameters

-Async

Indicates that Windows PowerShell® returns immediately after it starts the recovery and does not display status messages.

Aliases

none

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-BackupSet<WBBackupSet>

Specifies a backup set object that contains a application backup.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

-Force

Indicates that the cmdlet starts the recovery operation without prompting you for confirmation. By default, the cmdlet prompts you for confirmation before it proceeds.

Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-NoRollForward

Indicates that you can recover a VM from a previous point in time if you select the latest version of the application from the backups. For versions of the application other than the latest version, the operation uses point-in-time recovery by default.

Aliases

none

Required?

false

Position?

4

Default Value

False

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-RecreatePath

Indicates that the recovery operation recreates the original folder structure when it restores a VM. This option applies only if you recover a VM to an alternate location. If you do not specify this option, the recovery puts all files for a component under a single folder.

Aliases

none

Required?

false

Position?

8

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TargetPath<String>

Specifies an alternate location in the backup set where the recovery process searches for files.

Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-UseAlternateLocation

Indicates that you can use the recovery process to recover components, update configuration, and register the VM with the management service. This option applies only if you recover a VM to an alternate location.

Aliases

none

Required?

false

Position?

7

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-VMInBackup<WBVirtualMachine[]>

Specifies a list of virtual machine objects that contain the VMs to recover. This list must contain VMs from the application object in the backup set's application array.

Aliases

none

Required?

true

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByValue)

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • WBBackupSet, WBVirtualMachine

Outputs

The output type is the type of the objects that the cmdlet emits.

  • System.String

Examples

Example 1: Recover a VM to its original location

This example recovers a VM to its original location.

The first command gets the backup set object from the system catalog and stores it in the variable named $Backup.

The second command uses the backup set stored in $Backup to recover a VM that has the ID 285CEA9B-E337-44E1-9BF9-BF431BC3EB35 to its original location.

PS C:\> $Backup = Get-WBBackupSet 
PS C:\> Start-WBHyperVRecovery -BackupSet $Backup -VMInBackup $Backup.Application[0].Component[0]

WARNING: The virtual machines may not start if the network settings are
different after recovery. Verify the settings of the virtual machines using
HyperV Manager before attempting to start.

Warning
Start recovery of application HyperV to original location ?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
Recovering component 285CEA9B-E337-44E1-9BF9-BF431BC3EB35 :
Application recovery in progress.
Completed.

Example 2: Recover a VM to an alternate location

This example recovers a VM to an alternate location.

The first command gets the backup set object from the system catalog and stores it in the variable named $Backup.

The second command recovers the VM that has the ID F7D8AAF4-D086-47CC-8264-61F80527BFF4 to an alternate location.

PS C:\> $Backup = Get-WBBackupSet 
PS C:\> Start-WBHyperVRecovery -BackupSet $Backup -VMInBackup $Backup.Application[0].Component[1] -RecoveryTarget F:\Dir1 -AlternateLocation -RecreatePath

WARNING: The virtual machines may not start if the network settings are
different after recovery. Verify the settings of the virtual machines using
HyperV manager before attempting to start.
WARNING: If a virtual machine you are trying to recover to alternate location
was backed up from this host, this will delete and overwrite the original
virtual machine if it still exists.

Warning
Start recovery of application HyperV to F:\dir1 ?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y
Recovering component F7D8AAF4-D086-47CC-8264-61F80527BFF4 :
Recovering component F7D8AAF4-D086-47CC-8264-61F80527BFF4 : Preparing to recover.
Completed.