New-VBRHvVirtualDeviceMappingRule

Short Description

Defines mapping settings of a backed-up virtual disk.

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

Syntax

New-VBRHvVirtualDeviceMappingRule -SourceDevice <VBRViVirtualDevice> -Path <String> [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRHvVirtualDeviceMappingRule object that contains mapping settings of a VMware backed-up virtual disk to Hyper-V target host file path.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

Path

Specifies a path on Hyper-V host for a backed-up virtual disk.

String

True

Named

False

SourceDevice

Specifies a backed-up virtual disk. The cmdlet will map this disk to the Hyper-V file path.

Accepts the VBRViVirtualDevice object. To create this object, run the Get-VBRViVirtualDeviceReturns details on VMware VM virtual disks. cmdlet.

VBRViVirtualDevice

True

Named

False

<CommonParameters>

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

Output Object

The cmdlet returns the VBRHvVirtualDeviceMappingRule object that contains backed-up virtual disk mapping settings.

Examples

Mapping Backed-Up Virtual Disks to Hyper-V Host File Path

This example shows how to map the backed-up virtual disk to the custom filepath on the Hyper-V host. The cmdlet will map the virtual disk of the VM that is backed up by the Winsrv4515 job.

$backup = Get-VBRBackup -Name "Winsrv4515"

$restorepoint = Get-VBRRestorePoint -Backup $backup

$disks = Get-VBRViVirtualDevice -RestorePoint $restorepoint[3]

New-VBRHvVirtualDeviceMappingRule -SourceDevice $disks[0] -Path "D:\VMs\disks"

Perform the following steps:

  1. Get the backed-up VM virtual disks:
    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. Set the $backup variable as the Backup parameter value. Save the result to the $restorepoint variable.

      The Get-VBRRestorePoint cmdlet will return an array of restore points. Consider that the array numbering starts with 0. In our example, the fourth restore point will be used.

    3. Run the Get-VBRViVirtualDeviceReturns details on VMware VM virtual disks. cmdlet. Set the $restorepoint[3] as the RestorePoint parameter value. Save the result to the $disks variable.

      The Get-VBRViVirtualDevice cmdlet will return an array of disks. Consider that the array numbering starts with 0. In our example, the first disk will be used.

  2. Run the New-VBRHvVirtualDeviceMappingRule cmdlet. Set the $disks[0] variable as the SourceVirtualDevice parameter value. Specify the Path parameter value.

Page updated 2026-08-19

Page content applies to build 13.1.1.18