Start-VBRADForestPartialRestore

Short Description

Starts a partial Microsoft Active Directory forest recovery.

Platform: VMware, Hyper-V

Product Edition: Veeam Universal License

Syntax

Start-VBRADForestPartialRestore -DomainSpec <VBRADForestPartialRestoreDomainSpec[]>

-ProductionForestServer <String> -ConnectionCredential <PSCredential> [-UseSsl <Boolean>]

[-ForceAcceptCertificate] [-Reason <String>] [-EnableAntivirusScan] [-EnableYARAScan] [-YARAScanRule <String>]

[-RunAsync] [-Force] [<CommonParameters>]

Detailed Description

This cmdlet starts a partial recovery of a Microsoft Active Directory forest. The cmdlet recovers domain controllers to the original forest that is still running. To perform the recovery, Veeam Backup & Replication connects to the production Active Directory forest.

Before starting the recovery, create a domain controller recovery specification for each domain controller you want to recover. You can recover domain controllers to the following targets:

  • VMware vSphere: run the New-VBRViADForestDcRestoreSpecCreates a VMware domain controller recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet.
  • Microsoft Hyper-V: run the New-VBRHvADForestDcRestoreSpecCreates a Hyper-V domain controller recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet.
  • New Microsoft Windows servers: run the New-VBRADForestCleanMachineDcRestoreSpecCreates a domain controller recovery specification for recovering a domain controller to a new Microsoft Windows server during a partial Microsoft Active Directory forest recovery. cmdlet.

Then create a domain recovery specification for each domain that contains a domain controller you want to recover. To create this specification, run the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet.

To recover the entire forest, run the Start-VBRADForestRestoreStarts an entire Microsoft Active Directory forest recovery. cmdlet.

Parameters

Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

ConnectionCredential

Specifies the credentials of an account that Veeam Backup & Replication uses to connect to the production Active Directory forest.

Accepts the PSCredential object. To get this object, run the Get-Credential cmdlet.

PSCredential

True

Named

False

DomainSpec

Specifies the array of domain recovery specifications. Each specification defines the domain controller to recover in a domain. You can specify only one domain recovery specification for a domain. All domain recovery specifications must belong to the same Microsoft Active Directory forest.

Accepts the VBRADForestPartialRestoreDomainSpec[] object. To create this object, run the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet.

VBRADForestPartialRestoreDomainSpec[]

True

Named

False

EnableAntivirusScan

Enables the secure restore option. Veeam Backup & Replication will trigger the antivirus software to scan the restore points of the domain controllers before the recovery.

SwitchParameter

False

Named

False

EnableYARAScan

Enables the YARA scan for the restore points of the domain controllers.

Use the YARAScanRule parameter to specify the YARA rule to be used.

SwitchParameter

False

Named

False

Force

Defines that the cmdlet will continue the recovery without asking for confirmation when the validation checks return warnings.

SwitchParameter

False

Named

False

ForceAcceptCertificate

Defines that Veeam Backup & Replication will accept the certificate of the production forest endpoint without asking for confirmation if the certificate is not trusted. Veeam Backup & Replication accepts the certificate for this recovery only.

This parameter applies only when the UseSsl parameter value is $true. Veeam Backup & Replication rejects a certificate that is not issued for the server specified in the ProductionForestServer parameter, even if you provide this parameter.

SwitchParameter

False

Named

False

ProductionForestServer

Specifies the DNS name or IP address of the endpoint in the production Active Directory forest to which Veeam Backup & Replication connects.

String

True

Named

False

Reason

Specifies the reason for the recovery operation. Veeam Backup & Replication adds this reason to the recovery session log.

String

False

Named

False

RunAsync

Defines that the cmdlet will run the recovery operation asynchronously. The cmdlet returns a session object immediately without waiting for the recovery to complete.

SwitchParameter

False

Named

False

UseSsl

Defines whether Veeam Backup & Replication connects to the production Active Directory forest using SSL. To connect without SSL, set this parameter to $false.

Default: $true.

Boolean

False

Named

False

YARAScanRule

Specifies the YARA rule. Veeam Backup & Replication will scan the restore points of the domain controllers with this rule.

Veeam Backup & Replication searches for YARA rules in the YaraRules folder. The default path is: C:\Program Files\Veeam\Backup and Replication\Backup\YaraRules.

To use a YARA rule, you must specify its name and extension. Veeam Backup & Replication accepts only .yar and .yara extensions.

String

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 VBRADForestRestoreSession object that contains properties of the Microsoft Active Directory forest recovery session.

Examples

Start-VBRADForestPartialRestoreExample 1. Partial Forest Recovery to VMware vSphere

This example shows how to start a partial forest recovery of one domain controller to VMware vSphere.

$forest = Get-VBRADForest

$domains = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = (Get-VBRADForestDomainRestorePoint -Domain $domains[0])[0]

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

$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 -Server $server -ResourcePool $resourcePool -Datastore $datastore -Folder $folder -VMName "DC01-Restored"

$domainCredentials = Get-Credential

$domainSpec = New-VBRADForestPartialRestoreDomainSpec -Domain $domains[0] -DomainCredentials $domainCredentials -DcRestoreSpec $dcSpec

$connectionCredential = Get-Credential

$restore = Start-VBRADForestPartialRestore -DomainSpec $domainSpec -ProductionForestServer "dc01.tech.local" -ConnectionCredential $connectionCredential -RunAsync -Reason "Domain controller repair"

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 $domains variable. The cmdlet returns all domains in the forest; this example uses the first one ($domains[0]).
  3. Run the Get-VBRADForestDomainRestorePointReturns restore points for an Active Directory domain. cmdlet. Set the $domains[0] variable as the Domain parameter value. Save the first restore point to the $domainRestorePoint variable.
  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 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.
  6. 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.
  7. 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.
  8. 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 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.

    Save the result to the $dcSpec variable.

  9. Run the Get-Credential cmdlet. Enter the credentials of an account with Domain Admin privileges. Save the result to the $domainCredentials variable.
  10. Run the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domains[0] variable as the Domain parameter value.
    • Set the $domainCredentials variable as the DomainCredentials parameter value.
    • Set the $dcSpec variable as the DcRestoreSpec parameter value.

    Save the result to the $domainSpec variable.

  11. Run the Get-Credential cmdlet. Enter the credentials of the account that Veeam Backup & Replication will use to connect to the production forest. Save the result to the $connectionCredential variable.
  12. Run the Start-VBRADForestPartialRestore cmdlet. Specify the following parameters:
    • Set the $domainSpec variable as the DomainSpec parameter value.
    • Specify the ProductionForestServer parameter value.
    • Set the $connectionCredential variable as the ConnectionCredential parameter value.
    • Provide the RunAsync parameter.
    • Specify the Reason parameter value.

    Save the result to the $restore variable.

Start-VBRADForestPartialRestoreExample 2. Partial Forest Recovery to Microsoft Hyper-V

This example shows how to start a partial forest recovery of one domain controller to Microsoft Hyper-V.

$forest = Get-VBRADForest

$domains = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = (Get-VBRADForestDomainRestorePoint -Domain $domains[0])[0]

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

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

$domainCredentials = Get-Credential

$domainSpec = New-VBRADForestPartialRestoreDomainSpec -Domain $domains[0] -DomainCredentials $domainCredentials -DcRestoreSpec $dcSpec

$connectionCredential = Get-Credential

$restore = Start-VBRADForestPartialRestore -DomainSpec $domainSpec -ProductionForestServer "dc01.tech.local" -ConnectionCredential $connectionCredential -RunAsync -Reason "Domain controller repair"

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 $domains variable. The cmdlet returns all domains in the forest; this example uses the first one ($domains[0]).
  3. Run the Get-VBRADForestDomainRestorePointReturns restore points for an Active Directory domain. cmdlet. Set the $domains[0] variable as the Domain parameter value. Save the first restore point to the $domainRestorePoint variable.
  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-VBRHvADForestDcRestoreSpecCreates a Hyper-V domain controller recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domainRestorePoint 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.

  6. Run the Get-Credential cmdlet. Enter the credentials of an account with Domain Admin privileges. Save the result to the $domainCredentials variable.
  7. Run the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domains[0] variable as the Domain parameter value.
    • Set the $domainCredentials variable as the DomainCredentials parameter value.
    • Set the $dcSpec variable as the DcRestoreSpec parameter value.

    Save the result to the $domainSpec variable.

  8. Run the Get-Credential cmdlet. Enter the credentials of the account that Veeam Backup & Replication will use to connect to the production forest. Save the result to the $connectionCredential variable.
  9. Run the Start-VBRADForestPartialRestore cmdlet. Specify the following parameters:
    • Set the $domainSpec variable as the DomainSpec parameter value.
    • Specify the ProductionForestServer parameter value.
    • Set the $connectionCredential variable as the ConnectionCredential parameter value.
    • Provide the RunAsync parameter.
    • Specify the Reason parameter value.

    Save the result to the $restore variable.

Start-VBRADForestPartialRestoreExample 3. Partial Forest Recovery to New Microsoft Windows Server

This example shows how to start a partial forest recovery of one domain controller to a new Microsoft Windows server.

$forest = Get-VBRADForest

$domains = Get-VBRADForestDomain -ADForest $forest

$domainRestorePoint = (Get-VBRADForestDomainRestorePoint -Domain $domains[0])[0]

$localCredentials = Get-Credential

$dsrmPassword = Read-Host -Prompt "Enter DSRM password" -AsSecureString

$dcSpec = New-VBRADForestCleanMachineDcRestoreSpec -RestorePoint $domainRestorePoint -TargetMachine "srv01.tech.local" -LocalCredentials $localCredentials -DsrmPassword $dsrmPassword

$domainCredentials = Get-Credential

$domainSpec = New-VBRADForestPartialRestoreDomainSpec -Domain $domains[0] -DomainCredentials $domainCredentials -DcRestoreSpec $dcSpec

$connectionCredential = Get-Credential

$restore = Start-VBRADForestPartialRestore -DomainSpec $domainSpec -ProductionForestServer "dc01.tech.local" -ConnectionCredential $connectionCredential -RunAsync -Reason "Domain controller repair"

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 $domains variable. The cmdlet returns all domains in the forest; this example uses the first one ($domains[0]).
  3. Run the Get-VBRADForestDomainRestorePointReturns restore points for an Active Directory domain. cmdlet. Set the $domains[0] variable as the Domain parameter value. Save the first restore point to the $domainRestorePoint variable.
  4. Run the Get-Credential cmdlet. Enter the credentials of an account with local administrator privileges on the target server. Save the result to the $localCredentials variable.
  5. Run the Read-Host cmdlet. Specify the message that the console will display as a prompt. Provide the AsSecureString parameter. Save the result to the $dsrmPassword variable.
  6. Run the New-VBRADForestCleanMachineDcRestoreSpecCreates a domain controller recovery specification for recovering a domain controller to a new Microsoft Windows server during a partial Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domainRestorePoint variable as the RestorePoint parameter value.
    • Specify the TargetMachine parameter value.
    • Set the $localCredentials variable as the LocalCredentials parameter value.
    • Set the $dsrmPassword variable as the DsrmPassword parameter value.

    Save the result to the $dcSpec variable.

  7. Run the Get-Credential cmdlet. Enter the credentials of an account with Domain Admin privileges. Save the result to the $domainCredentials variable.
  8. Run the New-VBRADForestPartialRestoreDomainSpecCreates a domain recovery specification for a partial Microsoft Active Directory forest recovery. cmdlet. Specify the following parameters:
    • Set the $domains[0] variable as the Domain parameter value.
    • Set the $domainCredentials variable as the DomainCredentials parameter value.
    • Set the $dcSpec variable as the DcRestoreSpec parameter value.

    Save the result to the $domainSpec variable.

  9. Run the Get-Credential cmdlet. Enter the credentials of the account that Veeam Backup & Replication will use to connect to the production forest. Save the result to the $connectionCredential variable.
  10. Run the Start-VBRADForestPartialRestore cmdlet. Specify the following parameters:
    • Set the $domainSpec variable as the DomainSpec parameter value.
    • Specify the ProductionForestServer parameter value.
    • Set the $connectionCredential variable as the ConnectionCredential parameter value.
    • Provide the RunAsync parameter.
    • Specify the Reason parameter value.

    Save the result to the $restore variable.

Start-VBRADForestPartialRestoreExample 4. Partial Forest Recovery with Secure Restore

This example shows how to start a partial forest recovery with the antivirus scan and the YARA scan of the restore points. The $domainSpec variable contains the domain recovery specification that you created in advance.

$connectionCredential = Get-Credential

$restore = Start-VBRADForestPartialRestore -DomainSpec $domainSpec -ProductionForestServer "dc01.tech.local" -ConnectionCredential $connectionCredential -EnableAntivirusScan -EnableYARAScan -YARAScanRule "Ransomware.yar"

Perform the following steps:

  1. Run the Get-Credential cmdlet. Enter the credentials of the account that Veeam Backup & Replication will use to connect to the production forest. Save the result to the $connectionCredential variable.
  2. Run the Start-VBRADForestPartialRestore cmdlet. Specify the following parameters:
    • Set the $domainSpec variable as the DomainSpec parameter value.
    • Specify the ProductionForestServer parameter value.
    • Set the $connectionCredential variable as the ConnectionCredential parameter value.
    • Provide the EnableAntivirusScan parameter.
    • Provide the EnableYARAScan parameter.
    • Specify the YARAScanRule parameter value.

    Save the result to the $restore variable.

Page updated 2026-11-06

Page content applies to build 13.2.0.193