--- title: "New-VBRADForestCleanMachineDomainRestoreSpec" description: "This cmdlet creates the VBRADForestDomainRestoreSpec object. This object defines the target settings for recovering a domain controller to a new Microsoft Windows server during an entire Microsoft Active Directory forest recovery." canonical: "https://helpcenter.veeam.com/docs/vbr/powershell/new-vbradforestcleanmachinedomainrestorespec.html" breadcrumb: "Veeam PowerShell Reference > Veeam PowerShell Reference > Data Recovery > Microsoft Active Directory Forest Recovery > New-VBRADForestCleanMachineDomainRestoreSpec" dateModified: "2026-11-06" --- # New-VBRADForestCleanMachineDomainRestoreSpec ## Short Description Creates a domain recovery specification for recovering a domain controller to a new Microsoft Windows server during an entire Microsoft Active Directory forest recovery. **Platform**: VMware, Hyper-V **Product Edition**: Veeam Universal License ## Syntax ``` New-VBRADForestCleanMachineDomainRestoreSpec [-RestorePoint] -TargetMachine -LocalCredentials -DsrmPassword -DomainCredentials [] ``` ## Detailed Description This cmdlet creates the [`VBRADForestDomainRestoreSpec`](vbradforestdomainrestorespec.md) object. This object defines the target settings for recovering a domain controller to a new Microsoft Windows server during an entire Microsoft Active Directory forest recovery. The target server must have a freshly installed operating system. Create one specification for each domain controller you want to recover. Use this object with the [`Start-VBRADForestRestore`](start-vbradforestrestore.md) cmdlet. To recover a domain controller as a VM, run the [`New-VBRViADForestDomainRestoreSpec`](new-vbrviadforestdomainrestorespec.md) cmdlet for VMware environments or the [`New-VBRHvADForestDomainRestoreSpec`](new-vbrhvadforestdomainrestorespec.md) cmdlet for Hyper-V environments. ## Parameters

Parameter

Description

Type

Required

Position

Accept Pipeline Input

DomainCredentials

Specifies the credentials of an account with Domain Admin privileges. Veeam Backup & Replication uses this account to recover the domain controller.

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

PSCredential

True

Named

False

DsrmPassword

Specifies a secure string that contains the Directory Services Restore Mode (DSRM) password for the recovered domain controller.

SecureString

True

Named

False

LocalCredentials

Specifies the credentials of an account with local administrator privileges on the target server. Veeam Backup & Replication uses this account to connect to the target server through the ADMIN$ administrative share.

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

PSCredential

True

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-VBRADForestDomainRestorePoint cmdlet.

VBRADForestDomainRestorePoint

True

0

True (ByPropertyName, ByValue)

TargetMachine

Specifies the DNS name or IP address of the new Microsoft Windows server to which the domain controller will be recovered. The server must have a freshly installed operating system. You can assign only one domain controller to a server.

String

True

Named

False

`` This cmdlet supports Microsoft PowerShell common parameters. For more information on common parameters, see [ Microsoft Docs](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_commonparameters?view=powershell-7). ## Output Object The cmdlet returns the [`VBRADForestDomainRestoreSpec`](vbradforestdomainrestorespec.md) object that defines the target settings for recovering a domain controller to a new Microsoft Windows server. ## Examples ::: example ### Creating Domain Recovery Specification for New Windows Server This example shows how to create a domain recovery specification for recovering a domain controller to a new Microsoft Windows server. ``` $forest = Get-VBRADForest $domain = Get-VBRADForestDomain -ADForest $forest $domainRestorePoint = Get-VBRADForestDomainRestorePoint -Domain $domain $localCredentials = Get-Credential $dsrmPassword = Read-Host -Prompt "Enter DSRM password" -AsSecureString $domainCredentials = Get-Credential $cleanSpec = New-VBRADForestCleanMachineDomainRestoreSpec -RestorePoint $domainRestorePoint[0] -TargetMachine "srv01.tech.local" -LocalCredentials $localCredentials -DsrmPassword $dsrmPassword -DomainCredentials $domainCredentials ``` Perform the following steps: 1. Run the [`Get-VBRADForest`](get-vbradforest.md) cmdlet. Save the result to the `$forest` variable. 2. Run the [`Get-VBRADForestDomain`](get-vbradforestdomain.md) cmdlet. Set the `$forest` variable as the `ADForest` parameter value. Save the result to the `$domain` variable. 3. Run the [`Get-VBRADForestDomainRestorePoint`](get-vbradforestdomainrestorepoint.md) 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-Credential`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.1) 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`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-6) 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 `Get-Credential` cmdlet. Enter the credentials of an account with Domain Admin privileges. Save the result to the `$domainCredentials` variable. 7. Run the `New-VBRADForestCleanMachineDomainRestoreSpec` cmdlet. Specify the following parameters: - Set the `$domainRestorePoint[0]` 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. - Set the `$domainCredentials` variable as the `DomainCredentials` parameter value. Save the result to the `$cleanSpec` variable to use it with other cmdlets. ::: ## Related Commands - [`Get-VBRADForest`](get-vbradforest.md) - [`Get-VBRADForestDomain`](get-vbradforestdomain.md) - [`Get-VBRADForestDomainRestorePoint`](get-vbradforestdomainrestorepoint.md) - [`Get-Credential`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.security/get-credential?view=powershell-7.5) - [`Read-Host`](https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/read-host?view=powershell-6) - [`Start-VBRADForestRestore`](start-vbradforestrestore.md)