This is an archive version of the document. To get the most up-to-date information, see the current version.

Start-VBRRestoreVM

Short Description

Starts restore of the entire VMware VM.

Applies to

Platform: VMware

For Hyper-V, run Start-VBRHvRestoreVM.

Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License

Syntax

This cmdlet provides the following parameter sets:

  • For restore to another location

Start-VBRRestoreVM [-RestorePoint] <COib> [-Server] <CHost> [[-ResourcePool] <CViResourcePoolItem>] [[-Datastore]<CViDatastoreItem>] [-Folder <CViFolderItem>] [-StoragePolicy <VBRViStoragePolicy>] [-SourceNetwork <VBRViNetworkInfo[]>] [-TargetNetwork <VBRViNetworkInfo[]>] [-VMName <string>] [-DiskType <EDiskCreationMode> {Source | Thick | Thin | ThickEagerZeroed}] [-PowerUp <bool>] [-SkipTagsRestore] [-Reason <string>] [-RunAsync][-Credentials <CCredentials>] [-Force] [-EnableAntivirusScan] [-EnableEntireVolumeScan] [-VirusDetectionAction <VBRVirusDetectionAction> {DisableNetwork | AbortRecovery}]  [<CommonParameters>]

  • For restore to a new location, or to original location with different settings

Start-VBRRestoreVM [-RestorePoint] <COib> [-Server] <CHost> [[-ResourcePool] <CViResourcePoolItem>] [[-Datastore]<CViDatastoreItem>] -EnableStagedRestore -StagingVirtualLab <CViSbVirtualLab> -StagingScript <string> -StagingCredentials <CInternalCredentials> [-Folder <CViFolderItem>] [-StoragePolicy <VBRViStoragePolicy>] [-SourceNetwork <VBRViNetworkInfo[]>] [-TargetNetwork <VBRViNetworkInfo[]>] [-VMName <string>] [-DiskType <EDiskCreationMode> {Source | Thick | Thin | ThickEagerZeroed}] [-PowerUp <bool>] [-SkipTagsRestore] [-Reason <string>] [-RunAsync] [-Credentials <CCredentials>] [-Force] [-EnableAntivirusScan] [-EnableEntireVolumeScan] [-VirusDetectionAction <VBRVirusDetectionAction> {DisableNetwork | AbortRecovery}] [-StagingApplicationGroup <CSbAppGroup>] [-StagingStartupOptions <VBRApplicationGroupStartupOptions>]  [<CommonParameters>]

  • For restore to original location

Start-VBRRestoreVM [-RestorePoint] <COib> -ToOriginalLocation [-DiskType <EDiskCreationMode> {Source | Thick | Thin | ThickEagerZeroed}] [-PowerUp <bool>] [-SkipTagsRestore] [-Reason <string>] [-RunAsync] [-QuickRollback][-StoragePolicyAction <VBRStoragePolicyAction> {Current | Stored | Default}] [-Credentials <CCredentials>][-Force] [-EnableAntivirusScan] [-EnableEntireVolumeScan] [-VirusDetectionAction <VBRVirusDetectionAction> {DisableNetwork | AbortRecovery}]  [<CommonParameters>]

Detailed Description

This cmdlet starts the entire VM restore. With this cmdlet, you can restore the VM with the following options:

  • Restore to original location
  • Restore to original location with different settings
  • Restore to another location
  • Staged restore
  • Secure restore

Parameters

Parameter

Description

Required

Position

Accept
Pipeline
Input

Accept
Wildcard
Characters

RestorePoint

Specifies the VM restore point to which you want to restore.

True

0

True (ByValue,
ByProperty
Name)

False

Server

Specifies the ESXi host where you want to locate the restored VM.

NOTE: The cmdlet will not run if you specify this parameter with the ToOriginalLocation parameter.

True

1

False

False

EnableStagedRestore

NOTE: This parameter is required for staged restore only.

Enables the staged restore option.

True

Named

False

False

StagingCredentials

NOTE: This parameter is required for staged restore only.

Specifies the VM guest credentials for the staged restore. Veeam Backup & Replication will use these credentials for authenticating with the VM and run the script.

Accepts the CInternalCredentials type.

True

Named

False

False

StagingScript

NOTE: This parameter is required for staged restore only.

Specifies the script location. Veeam Backup & Replication will use this script to prepare VMs before the restore.

True

Named

False

False

StagingVirtualLab

NOTE: This parameter is required for staged restore only.

Specifies the virtual lab. The cmdlet will use this virtual lab to start VMs and run the script.

Specifies the virtual lab that you will use for staged restore. Veeam Backup & Replication will move VMs into the isolated environment and will run the staging script

True

Named

False

False

ResourcePool

For restore to another location.

Specifies the resource pool where you want to locate the restored VM.

False

2

False

False

Datastore

For restore to another location.

Specifies the datastore to which you want to connect the restored VM.

False

3

False

False

StoragePolicy

Specifies the VMware storage policy profile that must be applied to the restored virtual disks.

Accepts VBRViStoragePolicy type.

False

Named

False

False

Folder

For restore to another location.

Specifies the folder where you want to locate the restored VM.

False

Named

False

False

VMName

Specifies the name you want to apply to the restored VM.

By default, the original VM name is applied.

False

Named

False

False

DiskType

Specifies the disk type you want to apply to the restored VM:

  • Thin
  • Thick
  • AsOriginal

False

Named

False

False

PowerUp

If set, the restored VM will be powered up immediately after the restore. Otherwise, you will have to power up the VM manually.

False

Named

False

False

SkipTagsRestore

If set, the VM will be restored without its VMware tag. Otherwise, the restored VM will keep its original tag.

False

Named

False

False

Reason

Specifies the reason for performing restore of the selected VM.

The information you provide will be saved in the session history so that you can reference it later.

False

Named

False

False

RunAsync

Indicates that the command returns immediately without waiting for the task to complete.

False

Named

False

False

QuickRollback

For restore to original location.

Indicates that the incremental restore must be performed.

False

Named

False

False

ToOriginalLocation

Indicates that the VM must be restored with original ResourcePool, Datastore and Folder settings.

NOTE: The cmdlet will not run if you specify this parameter with the Server parameter.

False

Named

False

False

StoragePolicyAction

Specifies the strategy for selecting storage policy profile in case the storage profile of the backed up VM differs from the profile of the original VM:

  • Current: the restored VM will be subscribed to the same profile as in backup (if such profile still exists) or to the profile to which the original VM is subscribed (if profile as in backup was removed).
  • Default: the restored VM will be subscribed to the profile that is set as default for the target datastore.
  • Stored: the restored VM will be subscribed to the profile as in backup (if such profile still exists).

False

Named

False

False

Force

Indicates that the cmdlet will perform VM restore even if the geographical location of the repository where VM backups reside and the target host location do not match.

False

Named

False

False

Credentials

Specifies the credentials you want to use for authenticating with the VM.

False

Named

False

False

SourceNetwork

For restore to another location.

Specifies the source site network. Veeam Backup & Replication will map it to the target network.

Note: This parameter is required if you specify the TargetNetwork parameter.

False

Named

False

False

TargetNetwork

For restore to another location.

Specifies the target site network. Veeam Backup & Replication will map it with the source network.

Note: This parameter is required if you specify the SourceNetwork parameter.

False

Named

False

False

StagingApplicationGroup

For staged restore.

Specifies the application group that the cmdlet will use for staged restore.

False

Named

False

False

StagingStartupOptions

For staged restore.

Specifies startup settings of VMs that you want to restore. Veeam Backup & Replication will use these settings to start selected VMs after recovery.

Accepts the VBRApplicationGroupStartupOptions type.

False

Named

False

False

EnableAntivirusScan

Indicates that the cmdlet will perform secure restore. Veeam Backup & Replication will trigger the antivirus software to scan selected VMs before the restore.

False

Named

False

False

EnableEntireVolumeScan

For secure restore.

Indicates that the antivirus will continue VMs scan after the first virus threat is found. Use this option if you want to get the report on all virus threats.

False

Named

False

False

VirusDetectionAction

For secure restore.

Specifies the secure restore action when the infection is detected.

  • DisableNetwork - use this option if you want to restore VMs with disabled network adapters (NICs).
  • AbortRecovery - use this option if you want to cancel the restore session.

False

Named

False

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see the About CommonParameters section of Microsoft Docs.

Example 1

This example shows how to restore of a VM to the original location.

  1. Run Get-VBRRestorePoint to get the array of the restore points for the selected VM. Save the result to the $restorepoint variable.
  2. Run Start-VBRRestoreVM with the $restorepoint variable. Set the Default value for the PowerUp parameter to subscribe the restored VM to the profile that is set as default for the target datastore.

$restorepoint = Get-VBRRestorePoint

Start-VBRRestoreVM -RestorePoint $restorepoint -Reason "Test restore" -ToOriginalLocation -StoragePolicyAction Default

Example 2

This example shows how to restore a VM to another location.

  1. Run Get-VBRRestorePoint to get an array of the restore points for the selected VM. Save the result to the $restorepoint variable.
  2. Run Get-VBRServer to specify the host where you want to locate the restored VM. Save the result to the $server variable.
  3. Run Find-VBRViResourcePool to get the required resource pool. Save the result to the $rpool variable.
  4. Run Find-VBRViDatastore to get the required datastore. Save the result to the $datastore variable.
  5. Run Start-VBRRestoreVM with the variables obtained in the previous steps. Specify the PowerUp parameter to boot the VM after it is restored.

$restorepoint = Get-VBRRestorePoint

$server = Get-VBRServer -Name "north.support.local"

$rpool = Find-VBRViResourcePool -Server $server

$datastore = Find-VBRViDatastore -Server $server

Start-VBRRestoreVM –RestorePoint $restorepoint[1] –Server $server –ResourcePool $rpool –Datastore $datastore –PowerUp $true

Example 3

The example shows how perform staged restore of the selected VM.

  1. Run Get-VBRRestorePoint to get an array of the restore points for the selected VM. Save the result to the $restorepoint variable.
  2. Run Get-VBRServer to specify the host where you want to locate the restored VM. Save the result to the $server variable.
  3. Run Get-VSBVirtualLab to specify the virtual lab for staged restore. Save the result to the $lab variable.
  4. Run Get-VBRCredentials to specify the credentials for the account that has administrator privileges on the VM that you want to restore. Save the result to the $creds variable.
  5. Run Start-VBRRestoreVM with the variables obtained in the previous steps. Use the following parameters to specify additional settings:
  • Use the StagingScript parameter to specify the script location
  • Use the EnableStagedRestore parameter to enable staged restore

$restorepoint = Get-VBRRestorePoint

$server = Get-VBRServer -Name "north.support.local"

$lab = Get-VSBVirtualLab -Name "VirtualLab"

$creds = Get-VBRCredentials -Name "Administrator"

Start-VBRRestoreVM -RestorePoint $restorepoint[0] -Server $server -StagingVirtualLab $lab -StagingScript "c:/script.cmd" -EnableStagedRestore -StagingCredentials $creds

Related Commands

Get-VBRRestorePoint

Get-VBRServer

Find-VBRViResourcePool

Find-VBRViDatastore

Find-VBRViStoragePolicy

Find-VBRViFolder

Get-VBRLocation