win_domain_controller: optionally add -ReadOnlyReplica if true (#36017)

(cherry picked from commit 09d939fb00)
pull/36222/head
Jordan Borean 8 years ago
parent 375bc11139
commit 25e02d17d2
No known key found for this signature in database
GPG Key ID: 2AAC89085FBBDAB5

@ -204,10 +204,15 @@ Try {
if ($sysvol_path) {
$install_params.SysvolPath = $sysvol_path
}
if ($read_only) {
# while this is a switch value, if we set on $false site_name is required
# https://github.com/ansible/ansible/issues/35858
$install_params.ReadOnlyReplica = $true
}
if ($site_name) {
$install_params.SiteName = $site_name
}
$install_result = Install-ADDSDomainController -NoRebootOnCompletion -ReadOnlyReplica:$read_only -Force @install_params
$install_result = Install-ADDSDomainController -NoRebootOnCompletion -Force @install_params
Write-DebugLog "Installation completed, needs reboot..."
}

Loading…
Cancel
Save