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
Example 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:
- Run the
Get-VBRADForestReturns Microsoft Active Directory forests in your infrastructure. cmdlet. Save the result to the $forest variable.
- 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.
- 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]).
- 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.
- Run the
Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
- 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.
- 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.
- 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.
- Run the
Get-Credential cmdlet. Save the result to the $credentials variable.
- 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.
- 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.
- 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.
- 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.
|
Example 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:
- Run the
Get-VBRADForestReturns Microsoft Active Directory forests in your infrastructure. cmdlet. Save the result to the $forest variable.
- 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.
- 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]).
- 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.
- Run the
Get-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
|
Related Commands