Set-VBRViVirtualDeviceMappingRule
Short Description
Modifies backed-up virtual disk mapping settings.
Product Edition: Standard, Enterprise, Enterprise Plus, Veeam Universal License
Syntax
|
Set-VBRViVirtualDeviceMappingRule -MappingRule <VBRViVirtualDeviceMappingRule> [-SourceVirtualDevice <VBRViVirtualDevice>] [-Datastore <CViDatastoreItem>] [<CommonParameters>] |
Detailed Description
This cmdlet modifies mapping settings of backed-up virtual disks.
Note |
|
To modify settings, specify new values for the necessary parameters. The cmdlet will overwrite the previous parameter values with new values. The parameters that you omit will remain unchanged. |
Parameters
|
Parameter |
Description |
Type |
Required |
Position |
Accept Pipeline Input |
|---|---|---|---|---|---|
|
Datastore |
Specifies a datastore. The cmdlet will map backed-up virtual disks to this datastore.
Accepts the |
|
False |
Named |
False |
|
MappingRule |
Specifies the mapping settings that you want to modify.
Accepts the |
|
True |
Named |
True (ByPropertyName, ByValue) |
|
SourceVirtualDevice |
Specifies backed-up virtual disks. The cmdlet will map these disks to the datastore.
Accepts the |
|
False |
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 VBRViVirtualDeviceMappingRule object that defines backed-up virtual disks mapping settings.
Examples
Modifying Mapping Settings of Backed-Up Virtual Disks
This example shows how to modify an existing mapping rule. The cmdlet will set this rule to map backed-up virtual disks to the LocalStore_0 datastore.
|
$backup = Get-VBRBackup -Name "Winsrv4515" $restorepoint = Get-VBRRestorePoint -Backup $backup $disks = Get-VBRViVirtualDevice -RestorePoint $restorepoint[3] $mappingrule = New-VBRViVirtualDeviceMappingRule -SourceVirtualDevice $disks $server = Get-VBRServer -Name "WinSrv2073" $datastore = Find-VBRViDatastore -Server $server -Name "LocalStore_0" Set-VBRViVirtualDeviceMappingRule -MappingRule $mappingrule -Datastore $datastore |
Perform the following steps:
- Get the backed-up VM virtual disks:
- Run the
Get-VBRBackupReturns backups. cmdlet. Specify theNameparameter value. Save the result to the$backupvariable. - Run the
Get-VBRRestorePointReturns restore points. cmdlet. Specify theBackupparameter value. Save the result to the$restorepointvariable. - Run the
Get-VBRViVirtualDeviceReturns details on VMware VM virtual disks. cmdlet. Specify theRestorePointparameter value. Save the result to the$disksvariable.The
Get-VBRRestorePointcmdlet will return an array of disks. Consider that the array numbering starts with 0. In our example, the fourth restore point will be used.
- Run the
- Run the
New-VBRViVirtualDeviceMappingRuleDefines backed-up virtual disk mapping settings. cmdlet. Set the$disksvariable as theSourceVirtualDeviceparameter value. Save the result to the$mappingrulevariable. - Get the datastore:
- Run the
Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify theNameparameter value. Save the result to the$servervariable. - Run the
Find-VBRViDatastoreLooks for VMware datastores. cmdlet. Specify theNameandServerparameter values. Save the result to the$datastorevariable.
- Run the
- Run the
Set-VBRViVirtualDeviceMappingRulecmdlet. Set the$mappingrulevariable as theMappingRuleparameter value. Set the$datastorevariable as theDatastoreparameter value.
Related Commands
Get-VBRBackupReturns backups.Get-VBRRestorePointReturns restore points.Get-VBRViVirtualDeviceReturns details on VMware VM virtual disks.Get-VBRServerReturns hosts connected to the backup infrastructure.Find-VBRViDatastoreLooks for VMware datastores.New-VBRViVirtualDeviceMappingRuleDefines backed-up virtual disk mapping settings.