Below is an example script used to update the DC access password within the forest recovery project (project file name, accounts and hostnames are examples):
Add-PSSnapin *RecoveryManager*
$projectPath = "C:\Temp\Test.frproj"
$projectPassword = (ConvertTo-SecureString "qwerty" -AsPlainText -Force)
Open-RMADFEProject -Path $projectPath -Password $projectPassword
$credential = New-Object PSCredential("rmad\administrator", (ConvertTo-SecureString "secret" -asPlainText -Force))
$dsrmCredential = New-Object PSCredential("administrator", (ConvertTo-SecureString "qwerty" -asPlainText -Force))
# Set domain controller access and DSRM credential for specific DC
Set-RMADFEComputer -Name dc1.rmad.local -DcCredential $credential -DsrmCredential $dsrmCredential
# Set domain controller access and DSRM credential for domain
# Set-RMADFEDomain -Domain rmad.local -DcCredential $credential -DsrmCredential $dsrmCredential
# Set-RMADFEComputer -Name dc1.rmad.local -UseDomainSettings $True
Save-RMADFEProject -Path $projectPath -Password $projectPassword