New-VBRHvADForestDcRestoreSpec

Short Description

Creates a Hyper-V domain controller recovery specification for a partial Microsoft Active Directory forest recovery.

Platform: Hyper-V

Product Edition: Veeam Universal License

Syntax

New-VBRHvADForestDcRestoreSpec [-RestorePoint] <VBRADForestDomainRestorePoint> -Server <CHost> -Path <String>

-VMName <String> [-NetworkMapping <VBRHvInstantRecoveryNetworkMappingRule[]>] [-RegisterAsClusterResource] [<CommonParameters>]

Detailed Description

This cmdlet creates the VBRADForestDcRestoreSpec object. This object defines the target settings for recovering a domain controller VM on a Hyper-V host during a partial Microsoft Active Directory forest recovery. Use this object with the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

NetworkMapping

Specifies an array of network mapping rules for the recovery. Use this parameter to map source networks to networks available on the target Hyper-V host. Network mapping is required when you recover the domain controller VM to a host other than the original one.

Accepts the VBRHvInstantRecoveryNetworkMappingRule[] object. To get this object, run the New-VBRHvInstantRecoveryNetworkMappingRuleCreates a new network mapping rule. cmdlet.

VBRHvInstantRecoveryNetworkMappingRule[]

False

Named

False

Path

Specifies the path to the folder on the Hyper-V host where the domain controller VM files will be stored during the recovery.

String

True

Named

False

RegisterAsClusterResource

Defines that the recovered domain controller VM will be registered as a part of a cluster in case you recover the VM to a clustered host.

SwitchParameter

False

Named

False

RestorePoint

Specifies the domain controller restore point to use for the recovery operation.

Accepts the VBRADForestDomainRestorePoint object. To get this object, run the Get-VBRADForestDomainRestorePointReturns restore points for an Active Directory domain. cmdlet.

VBRADForestDomainRestorePoint

True

0

True (ByPropertyName, ByValue)

Server

Specifies the Hyper-V host on which to recover the domain controller VM.

CHost

True

Named

False

VMName

Specifies the name for the recovered domain controller VM.

String

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 VBRADForestDcRestoreSpec object that defines the target settings for recovering a domain controller VM on a Hyper-V host.

Examples

New-VBRHvADForestDcRestoreSpecExample 1. Creating Hyper-V Domain Controller Recovery Specification

This example shows how to create a domain controller recovery specification for a Hyper-V environment.

$forest = Get-VBRADForest

$domain = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = Get-VBRADForestDomainRestorePoint -Domain $domain

$server = Get-VBRServer -Name "hvhost01.company.local"

$dcSpec = New-VBRHvADForestDcRestoreSpec -RestorePoint $domainRestorePoint[0] -Server $server -Path "C:\VMs\Restore" -VMName "DC01-Restored"

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-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  5. Run the New-VBRHvADForestDcRestoreSpec cmdlet. Specify the following parameters:
    • Set the $domainRestorePoint[0] variable as the RestorePoint parameter value.
    • Set the $server variable as the Server parameter value.
    • Specify the Path parameter value.
    • Specify the VMName parameter value.

    Save the result to the $dcSpec variable to use it with other cmdlets.

New-VBRHvADForestDcRestoreSpecExample 2. Creating Hyper-V Domain Controller Recovery Specification with Network Mapping

This example shows how to create a domain controller recovery specification with network mapping for a Hyper-V environment.

$forest = Get-VBRADForest

$domain = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = Get-VBRADForestDomainRestorePoint -Domain $domain

$server = Get-VBRServer -Name "hvhost01.company.local"

$sourceNetwork = Get-VBRComputerNetworkInfo

$targetNetwork = Get-VBRHvServerNetworkInfo -Server $server

$networkMapping = New-VBRHvInstantRecoveryNetworkMappingRule -SourceNetwork $sourceNetwork -TargetNetwork $targetNetwork

$dcSpec = New-VBRHvADForestDcRestoreSpec -RestorePoint $domainRestorePoint[0] -Server $server -Path "C:\VMs\Restore" -VMName "DC01-Restored" -NetworkMapping $networkMapping

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-VBRServerReturns hosts connected to the backup infrastructure. cmdlet. Specify the Name parameter value. Save the result to the $server variable.
  5. Run the Get-VBRComputerNetworkInfoReturns networks connected to Veeam Agent computers. cmdlet. Save the result to the $sourceNetwork variable.
  6. Run the Get-VBRHvServerNetworkInfoReturns virtual networks for a Hyper-V host. cmdlet. Set the $server variable as the Server parameter value. Save the result to the $targetNetwork variable.
  7. Run the New-VBRHvInstantRecoveryNetworkMappingRuleCreates a new network mapping rule. cmdlet. Set the $sourceNetwork variable as the SourceNetwork parameter value. Set the $targetNetwork variable as the TargetNetwork parameter value. Save the result to the $networkMapping variable.
  8. Run the New-VBRHvADForestDcRestoreSpec cmdlet. Specify the following parameters:
    • Set the $domainRestorePoint[0] variable as the RestorePoint parameter value.
    • Set the $server variable as the Server parameter value.
    • Specify the Path parameter value.
    • Specify the VMName parameter value.
    • Set the $networkMapping variable as the NetworkMapping parameter value.

    Save the result to the $dcSpec variable to use it with other cmdlets.

Page updated 2026-11-06

Page content applies to build 13.2.0.193