DFSR Fails toinstall a Replication Group


I am unable to setup DFSR with the latest version of Window Server 2022.

Here is the script I am using:



# 1. Installing DFS-Replication feature on key servers
$SB = {
  $IHT = @{
    Name                   ='FS-DFS-Replication'
    IncludeManagementTools = $true
  Add-WindowsFeature @IHT
$ICHT = @{
  ScriptBlock     = $SB
  ComputerName    = 'DC1', 'DC2', 'SRV1', 'SRV2'
Invoke-Command @ICHT |
  Format-Table -Property PSComputername,FeatureResult, Success

# 2. Turning on administrative shares
$SB2 = {
  $SCHT = @{
    AutoShareServer      = $true 
    AutoShareWorkstation = $true
    Confirm              = $false    
  Set-SmbServerConfiguration @SCHT
  "Restarting LanmanServer on $(hostname)"
  Stop-Service -Name  LanManServer -Force
  Start-Service -Name  LanManServer
$CN = @('DC1','DC2','SRV1','SRV2')
Invoke-Command -ScriptBlock $SB2 -ComputerName $CN

# 3. Viewing DFSR cmdlets - which works fine
Import-Module -Name DFSR -WarningAction SilentlyContinue
Get-Module -Name DFSR 
Get-Command -Module DFSR | Measure-Object

# 4. Creating replication groups
$RGHT1 = @{
  GroupName   = 'SRVShareRG'  
  DomainName  = 'Reskit.Org'
  Description = 'Replication Group for SRV1, SRV2 shares'
New-DfsReplicationGroup @RGHT1



The final line gives me an error:

New-DfsReplicationGroup @RGHT1
New-DfsReplicationGroup: Could not create the replication group named "SRVShareRG". The specified domain does not exist or cannot be contacted.




1 Reply
Hi. What domain is the machine joined to where you are running this cmdlet? The error here is simply that an LDAP connection cannot be made to any DC in that domain, so I'd start with ensuring that DNS and DC connectivity in general are working there.