New-VBRRestoreNetworkMappingRule

Short Description

Creates a VMware network mapping rule for a Microsoft Active Directory forest recovery.

Platform: VMware

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

Detailed Description

This cmdlet defines the VBRViInstantRecoveryNetworkMappingRule object. This object defines how to map a network in the original site to a network on the target site (site where VMs will be recovered). You can use this object to specify network mapping when you recover a Microsoft Active Directory forest to VMware vSphere.

The New-VBRRestoreNetworkMappingRule cmdlet is an alias for the New-VBRViInstantRecoveryNetworkMappingRuleCreates a new network mapping rule. cmdlet.

To create a network mapping rule for Microsoft Hyper-V, run the New-VBRHvInstantRecoveryNetworkMappingRuleCreates a new network mapping rule. cmdlet.

Parameters

<CommonParameters>

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

Output Object

The cmdlet returns the VBRViInstantRecoveryNetworkMappingRule object that defines network mapping rules.

Examples

New-VBRRestoreNetworkMappingRuleExample 1. Creating Network Mapping Rule for Entire Forest Recovery

This example shows how to create a network mapping rule and use it in a VMware domain recovery specification for an entire Microsoft Active Directory forest recovery.

$forest = Get-VBRADForest

$domain = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = Get-VBRADForestDomainRestorePoint -Domain $domain

$restorePoint = Get-VBRRestorePoint -Id $domainRestorePoint[0].Id

$server = Get-VBRServer -Name "esx01.tech.local"

$sourceNetwork = Get-VBRComputerNetworkInfo -RestorePoint $restorePoint | Where-Object { $_.Name -eq "VM Network" }

$targetNetwork = Get-VBRViServerNetworkInfo -Server $server | Where-Object { $_.NetworkName -eq "Restore Network" }

$rule = New-VBRRestoreNetworkMappingRule -SourceNetwork $sourceNetwork -TargetNetwork $targetNetwork

$credentials = Get-Credential

$resourcePool = Find-VBRViResourcePool -Server $server -Name "Resources"

$datastore = Find-VBRViDatastore -Server $server -Name "Datastore01"

$folder = Find-VBRViEntity -Server $server -Name "Discovered virtual machine"

$viSpec = New-VBRViADForestDomainRestoreSpec -RestorePoint $domainRestorePoint[0] -Credentials $credentials -Server $server -ResourcePool $resourcePool -Datastore $datastore -Folder $folder -VMName "DC01-Restored" -NetworkMapping $rule

Perform the following steps:

  1. Run the Get-VBRADForestReturns Microsoft Active Directory forests in your infrastructure. cmdlet. Save the result to the $forest variable.
  2. Run the Get-VBRADForestDomainReturns Active Directory domains within a forest or a restore point. cmdlet. Set the $forest variable as the ADForest parameter value. Save the result to the $domain variable.
  3. Run the Get-VBRADForestDomainRestorePointReturns restore points for an Active Directory domain. cmdlet. Set the $domain variable as the Domain parameter value. Save the result to the $domainRestorePoint variable. The cmdlet returns an array of restore points (points in time); this example uses the first one ($domainRestorePoint[0]).
  4. Run the Get-VBRRestorePointReturns restore points. cmdlet. Set the ID of the $domainRestorePoint[0] restore point as the Id parameter value. Save the result to the $restorePoint variable.
  5. Run the Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  6. Run the Get-VBRComputerNetworkInfoReturns networks connected to Veeam Agent computers. cmdlet. Set the $restorePoint variable as the RestorePoint parameter value. Filter the result by the network name. Save the result to the $sourceNetwork variable.
  7. Run the Get-VBRViServerNetworkInfoReturns virtual networks for a VMware host. cmdlet. Set the $server variable as the Server parameter value. Filter the result by the network name. Save the result to the $targetNetwork variable.
  8. Run the New-VBRRestoreNetworkMappingRule cmdlet. Set the $sourceNetwork variable as the SourceNetwork parameter value. Set the $targetNetwork variable as the TargetNetwork parameter value. Save the result to the $rule variable.
  9. Run the Get-Credential cmdlet. Save the result to the $credentials variable.
  10. Run the Find-VBRViResourcePoolReturns VMware resource pools. cmdlet. Set the $server variable as the Server parameter value. Specify the Name parameter value. Save the result to the $resourcePool variable.
  11. Run the Find-VBRViDatastoreLooks for VMware datastores. cmdlet. Set the $server variable as the Server parameter value. Specify the Name parameter value. Save the result to the $datastore variable.
  12. Run the Find-VBRViEntityLooks for VMware objects. cmdlet. Set the $server variable as the Server parameter value. Specify the Name parameter value. Save the result to the $folder variable.
  13. Run the New-VBRViADForestDomainRestoreSpecCreates a VMware domain recovery specification for an entire Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domainRestorePoint[0] variable as the RestorePoint parameter value.
    • Set the $credentials variable as the Credentials parameter value.
    • Set the $server variable as the Server parameter value.
    • Set the $resourcePool variable as the ResourcePool parameter value.
    • Set the $datastore variable as the Datastore parameter value.
    • Set the $folder variable as the Folder parameter value.
    • Specify the VMName parameter value.
    • Set the $rule variable as the NetworkMapping parameter value.

    Save the result to the $viSpec variable to use it with the Start-VBRADForestRestoreStarts an entire Microsoft Active Directory forest recovery. cmdlet.

New-VBRRestoreNetworkMappingRuleExample 2. Creating Network Mapping Rule for Partial Forest Recovery

This example shows how to create a network mapping rule and use it in a VMware domain controller recovery specification for a partial Microsoft Active Directory forest recovery.

$forest = Get-VBRADForest

$domain = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = Get-VBRADForestDomainRestorePoint -Domain $domain

$restorePoint = Get-VBRRestorePoint -Id $domainRestorePoint[0].Id

$server = Get-VBRServer -Name "esx01.tech.local"

$sourceNetwork = Get-VBRComputerNetworkInfo -RestorePoint $restorePoint | Where-Object { $_.Name -eq "VM Network" }

$targetNetwork = Get-VBRViServerNetworkInfo -Server $server | Where-Object { $_.NetworkName -eq "Restore Network" }

$rule = New-VBRRestoreNetworkMappingRule -SourceNetwork $sourceNetwork -TargetNetwork $targetNetwork

$resourcePool = Find-VBRViResourcePool -Server $server -Name "Resources"

$datastore = Find-VBRViDatastore -Server $server -Name "Datastore01"

$folder = Find-VBRViEntity -Server $server -Name "Discovered virtual machine"

$dcSpec = New-VBRViADForestDcRestoreSpec -RestorePoint $domainRestorePoint[0] -Server $server -ResourcePool $resourcePool -Datastore $datastore -Folder $folder -VMName "DC01-Restored" -NetworkMapping $rule

Perform the following steps:

  1. Run the Get-VBRADForestReturns Microsoft Active Directory forests in your infrastructure. cmdlet. Save the result to the $forest variable.
  2. Run the Get-VBRADForestDomainReturns Active Directory domains within a forest or a restore point. cmdlet. Set the $forest variable as the ADForest parameter value. Save the result to the $domain variable.
  3. Run the Get-VBRADForestDomainRestorePointReturns restore points for an Active Directory domain. cmdlet. Set the $domain variable as the Domain parameter value. Save the result to the $domainRestorePoint variable. The cmdlet returns an array of restore points (points in time); this example uses the first one ($domainRestorePoint[0]).
  4. Run the Get-VBRRestorePointReturns restore points. cmdlet. Set the ID of the $domainRestorePoint[0] restore point as the Id parameter value. Save the result to the $restorePoint variable.
  5. Run the Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  6. Run the Get-VBRComputerNetworkInfoReturns networks connected to Veeam Agent computers. cmdlet. Set the $restorePoint variable as the RestorePoint parameter value. Filter the result by the network name. Save the result to the $sourceNetwork variable.
  7. Run the Get-VBRViServerNetworkInfoReturns virtual networks for a VMware host. cmdlet. Set the $server variable as the Server parameter value. Filter the result by the network name. Save the result to the $targetNetwork variable.
  8. Run the New-VBRRestoreNetworkMappingRule cmdlet. Set the $sourceNetwork variable as the SourceNetwork parameter value. Set the $targetNetwork variable as the TargetNetwork parameter value. Save the result to the $rule variable.
  9. Run the Find-VBRViResourcePoolReturns VMware resource pools. cmdlet. Set the $server variable as the Server parameter value. Specify the Name parameter value. Save the result to the $resourcePool variable.
  10. Run the Find-VBRViDatastoreLooks for VMware datastores. cmdlet. Set the $server variable as the Server parameter value. Specify the Name parameter value. Save the result to the $datastore variable.
  11. Run the Find-VBRViEntityLooks for VMware objects. cmdlet. Set the $server variable as the Server parameter value. Specify the Name parameter value. Save the result to the $folder variable.
  12. Run the New-VBRViADForestDcRestoreSpecCreates a VMware domain controller recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domainRestorePoint[0] variable as the RestorePoint parameter value.
    • Set the $server variable as the Server parameter value.
    • Set the $resourcePool variable as the ResourcePool parameter value.
    • Set the $datastore variable as the Datastore parameter value.
    • Set the $folder variable as the Folder parameter value.
    • Specify the VMName parameter value.
    • Set the $rule variable as the NetworkMapping parameter value.

    Save the result to the $dcSpec variable to use it with the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet.

Page updated 2026-11-09

Page content applies to build 13.2.0.193