Start-VBRRestoreVirtualDisks

Short Description

Restores disks from backups of physical or virtual machines and converts them to the VMDK, VHD or VHDX formats.

Platform: VMware, Hyper-V

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

Syntax

Start-VBRRestoreVirtualDisks [-RestorePoint] <COib> [-Server] <CHost> [-Path] <String>

[-Datastore <VBRViDatastoreBase>] -RestoreDiskType <EVirtualDiskRestoreType>

[-StorageFormat <VBRStorageFormatType>] [-Files <COIBFileInfo[]>] [-SourceShareCredentials <CCredentials>]

[-TargetShareCredentials <CCredentials>] [-Reason <String>] [-EnableAntivirusScan] [-EnableYARAScan]

[-YARAScanRule <String>] [-EnableEntireVolumeScan] [-ProceedToRecoveryIfThreatFound] [-RunAsync]

[-Proxy <CViProxy[]>] [<CommonParameters>]

Detailed Description

This cmdlet restores disks from backups of physical or virtual machines and converts them to the VMDK, VHD or VHDX formats. You restore disks from the following types of backups:

  • Volume-level backups created by Veeam Agent for Microsoft Windows volume-level backups.
  • Volume-level backups created by Veeam Agent for Linux volume-level backups.
  • Backups of VMware vSphere virtual machines created by Veeam Backup & Replication.
  • Backups of VMware Cloud Director virtual machines created by Veeam Backup & Replication.
  • Backups of Microsoft Hyper-V virtual machines created by Veeam Backup & Replication.
  • Backups of Amazon EC2 instances created by Veeam Backup for AWS.
  • Backups of Microsoft Azure virtual machines created by Veeam Backup for Microsoft Azure.
  • Backups of Google Compute Engine VM instances created by Google Cloud Plug-in for Veeam Backup & Replication.

The cmdlet allows you to scan the disks that you want to restore with the antivirus.

Run the Start-VBRRestoreVMFilesRestores VM configuration files. cmdlet to restore VM configuration files.

Note

In case the antivirus detects the virus threat, Veeam Backup & Replication will cancel the restore session.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Datastore

Specifies a target datastore. The cmdlet will register converted disks to this datastore.

Note: You must provide the Path parameter to specify the path to the folder in the datastore where you want to keep the converted disks. You must create the necessary folder beforehand.

Accepts the VBRViDatastoreBase object. To get this object, run the Find-VBRViDatastoreLooks for VMware datastores. cmdlet.

VBRViDatastoreBase

False

Named

False

EnableAntivirusScan

Enables the secure restore option. Veeam Backup & Replication will trigger the antivirus software to scan selected machines before the restore.

SwitchParameter

False

Named

False

EnableEntireVolumeScan

For secure restore.

Enables the option for the antivirus to continue physical discs scan after the first virus threat is found. Use this option if you want to get the report on all virus threats.

SwitchParameter

False

Named

False

EnableYARAScan

Enables the YARA scan for the selected VMs.

Use the YARAScanRule parameter to specify the YARA rule to be used.

SwitchParameter

False

Named

False

Files

Specifies the disks from the backup that you want to restore.

Default: all.

Accepts the COIBFileInfo[] object. To get this object, run the Get-VBRFilesInRestorePointReturns backup files in a selected restore point. cmdlet.

COIBFileInfo[]

False

Named

True (ByPropertyName)

Path

Specifies the path to the folder on the target server. The cmdlet will register virtual disks in this folder.

String

True

2

False

ProceedToRecoveryIfThreatFound

For secure restore.

Defines that if antivirus detects malware, the cmdlet will restore physical disks.

SwitchParameter

False

Named

False

Proxy

Specifies an array of VMware proxies. The cmdlet will use these proxies during the restore.

Accepts the CViProxy[] object. To get this object, run the Get-VBRViProxyReturns a list of VMware backup proxies. cmdlet.

CViProxy[]

False

Named

False

Reason

Specifies the reason for performing the disk restore.

String

False

Named

False

RestoreDiskType

Specifies the format to which you want to convert the resulting virtual disk:

  • VHD
  • VHDX
  • VMDK

EVirtualDiskRestoreType

True

Named

False

RestorePoint

Specifies the restore point from which you want to restore the disks.

Accepts the COib object. To get this object, run the Get-VBRRestorePointReturns restore points. cmdlet.

COib

True

0

True (ByPropertyName, ByValue)

RunAsync

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

SwitchParameter

False

Named

False

Server

Specifies the Windows host to which the disks should be restored.

CHost

True

1

False

SourceShareCredentials

Specifies the credentials for the backup repository. The cmdlet will export the backup from this repository.

CCredentials

False

Named

False

StorageFormat

Specifies the format that will be used to convert the resulting virtual disk:

  • Thin: the resulting vmdk virtual disk will be thin.
  • Thick: the restresulting vmdk virtual disk will be thick lazy zeroed.
  • EagerZeroedThick: resulting vmdk virtual disk will be eager lazy zeroed.
  • Fixed: resulting vhd/vhdx virtual disk will be thick fixed.
  • Dynamic: resulting vhd/vhdx virtual disk will be dynamic.

Default: Source.

VBRStorageFormatType

False

Named

False

TargetShareCredentials

Specifies the credentials for the shared folder. The cmdlet will add the exported files to that folder.

CCredentials

False

Named

False

YARAScanRule

Specifies the YARA rule. Veeam Backup & Replication will scan VMs with this rule.

Veeam Backup & Replication searches for YARA rules in the YaraRules folder. The default path is: C:\Program Files\Veeam\Backup and Replication\Backup\YaraRules.

To use a YARA rule, you must specify its name and extension. Veeam Backup & Replication accepts only .yar and .yara extensions.

String

False

Named

False

<CommonParameters>

This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see Microsoft Docs.

Examples

Start-VBRRestoreVirtualDisksExample 1. Restoring All Physical Disks from Volume-Level Backups by Veeam Agent

This example shows how to restore all physical disks from volume-level backups created by Veeam Agent operating in the standalone mode. The cmdlet will restore disks to a Veeam backup server. The disks are restored to the latest restore point. The resulting format is VMDK.

$server = Get-VBRLocalhost

$restorepoint = Get-VBRBackup -Name "Backup Job SRV03" | Get-VBRRestorePoint | Sort-Object -Property CreationTime | Select-Object -First 1

Start-VBRRestoreVirtualDisks -RestorePoint $restorepoint -Server $server -Path "C:\SRV03_Restored" -RestoreDiskType Vmdk -RunAsync

Perform the following steps:

  1. Run the Get-VBRLocalhostReturns the local server on which the backup infrastructure is installed. cmdlet. Save it to the $server variable.
  2. Get the most recent restore point:

    • Run the Get-VBRBackupReturns backups. cmdlet. Specify the Name parameter value.
    • Pipe the cmdlet output to the Get-VBRRestorePointReturns restore points. cmdlet.
    • Pipe the cmdlet output to the Sort-Object cmdlet and specify the CreationTime parameter value.
    • Pipe the cmdlet output to the Select-Object cmdlet. Specify the First parameter value.
    • Save the result to the $restorepoint variable.
  3. Run the Start-VBRRestoreVirtualDisks cmdlet. Specify the following settings:

    • Set the $restorepoint variable as the RestorePoint parameter value.
    • Set the $server variable as the Server parameter value.
    • Specify the Path parameter value.
    • Set the Vmdk option for the RestoreDiskType parameter.
    • Provide the RunAsync parameter value.

Start-VBRRestoreVirtualDisksExample 2. Restoring Specified Disks to Windows Server

This example shows how to restore specified disks to a Windows server added to Veeam Backup & Replication. The disks are restored to the latest restore point. The resulting format is VHDX.

$restorepoint = Get-VBRBackup -Name "Backup Job SRV03" | Get-VBRRestorePoint | Sort-Object -Property CreationTime | Select-Object -First 1

$server = Get-VBRServer -Type Windows -Name "Veeam_Remote"

$disks = Get-VBRFilesInRestorePoint -RestorePoint $restorepoint

Start-VBRRestoreVirtualDisks -RestorePoint $restorepoint -Server $server -Path "C:\SRV03_Restored" -RestoreDiskType Vhdx -Files $disks[1,3] -RunAsync

Perform the following steps:

  1. Get the most recent restore point:

    • Run the Get-VBRBackupReturns backups. cmdlet. Specify the Name parameter value.
    • Pipe the cmdlet output to the Get-VBRRestorePointReturns restore points. cmdlet.
    • Pipe the cmdlet output to the Sort-Object cmdlet and specify the CreationTime parameter value.
    • Pipe the cmdlet output to the Select-Object cmdlet. Specify the First parameter value.
    • Save the result to the $restorepoint variable.
  2. Run the Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Set the Windows option for the Type parameter. Specify the Name parameter value. Save it to the $server variable.
  3. Run the Get-VBRFilesInRestorePointReturns backup files in a selected restore point. cmdlet. Set the $restorepoint variable as the RestorePoint parameter value. Save the result to the $disks variable. In this example, disks 1 and 3 will be restored.
  4. Run the Start-VBRRestoreVirtualDisks cmdlet. Specify the following settings:

    • Set the $restorepoint variable as the RestorePoint parameter value.
    • Set the $server variable as the Server parameter value.
    • Specify the Path parameter value.
    • Set the Vhdx option for the RestoreDiskType parameter.
    • Set the $disks variable as the Files parameter value.

      The Get-VBRFilesInRestorePoint cmdlet will return an array. Mind the ordinal number of the necessary item (in our example, it is the second and fourth items in the array).

    • Provide the RunAsync parameter value.

Start-VBRRestoreVirtualDisksExample 3. Restoring Specified Disks to ESXi Host

This example shows how to restore selected disks to the 172.17.42.11 ESXi host and register them on the srv07-DAS1 datastore.

$backup = Get-VBRBackup -Name "MSExchange"

$rp = Get-VBRRestorePoint -Name *MSExchange02* -Backup $backup

$server = Get-VBRServer -Name "172.17.42.11"

$datastore = Find-VBRViDatastore -Server "172.17.42.11" -Name "srv07-DAS1"

Start-VBRRestoreVirtualDisks -RestorePoint $rp -Server $server -Path "C:\MSEx02_Restored" -Datastore $datastore -RestoreDiskType Vmdk -StorageFormat Thin

Perform the following steps:

  1. Run the Get-VBRBackupReturns backups. cmdlet. Specify the Name parameter value. Save the result to the $backup variable.
  2. Run the Get-VBRRestorePointReturns restore points. cmdlet. Specify the Name parameter value. Set the $backup variable as the Backup parameter value. Save the result to the $rp variable.
  3. Run the Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  4. Run the Find-VBRViDatastoreLooks for VMware datastores. cmdlet. Specify the Server and Name parameter values. Save the result to the $datastore variable.
  5. Run the Start-VBRRestoreVirtualDisks cmdlet. Specify the following settings:

    • Set the $rp variable as the RestorePoint parameter value.
    • Set the $server variable as the Server parameter value.
    • Specify the Path parameter value.
    • Set the $datastore variable as the Datastore parameter value.
    • Set the Vmdk option for the RestoreDiskType parameter.
    • Set the Thin option for the StorageFormat parameter.

Page updated 2026-08-19

Page content applies to build 13.1.1.18