DFSR Fails toinstall a Replication Group

%3CLINGO-SUB%20id%3D%22lingo-sub-2199590%22%20slang%3D%22en-US%22%3EDFSR%20Fails%20toinstall%20a%20Replication%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2199590%22%20slang%3D%22en-US%22%3E%3CP%3EI%20am%20unable%20to%20setup%20DFSR%20with%20the%20latest%20version%20of%20Window%20Server%202022.%3C%2FP%3E%3CP%3EHere%20is%20the%20script%20I%20am%20using%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CPRE%20class%3D%22lia-code-sample%20language-powershell%22%3E%3CCODE%3E%23%201.%20Installing%20DFS-Replication%20feature%20on%20key%20servers%0A%24SB%20%3D%20%7B%0A%20%20%24IHT%20%3D%20%40%7B%0A%20%20%20%20Name%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D'FS-DFS-Replication'%0A%20%20%20%20IncludeManagementTools%20%3D%20%24true%0A%20%20%7D%0A%20%20Add-WindowsFeature%20%40IHT%0A%7D%0A%24ICHT%20%3D%20%40%7B%0A%20%20ScriptBlock%20%20%20%20%20%3D%20%24SB%0A%20%20ComputerName%20%20%20%20%3D%20'DC1'%2C%20'DC2'%2C%20'SRV1'%2C%20'SRV2'%0A%7D%0AInvoke-Command%20%40ICHT%20%7C%0A%20%20Format-Table%20-Property%20PSComputername%2CFeatureResult%2C%20Success%0A%0A%23%202.%20Turning%20on%20administrative%20shares%0A%24SB2%20%3D%20%7B%0A%20%20%24SCHT%20%3D%20%40%7B%0A%20%20%20%20AutoShareServer%20%20%20%20%20%20%3D%20%24true%20%0A%20%20%20%20AutoShareWorkstation%20%3D%20%24true%0A%20%20%20%20Confirm%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3D%20%24false%20%20%20%20%0A%20%20%7D%0A%20%20Set-SmbServerConfiguration%20%40SCHT%0A%20%20%22Restarting%20LanmanServer%20on%20%24(hostname)%22%0A%20%20Stop-Service%20-Name%20%20LanManServer%20-Force%0A%20%20Start-Service%20-Name%20%20LanManServer%0A%7D%0A%24CN%20%3D%20%40('DC1'%2C'DC2'%2C'SRV1'%2C'SRV2')%0AInvoke-Command%20-ScriptBlock%20%24SB2%20-ComputerName%20%24CN%0A%0A%23%203.%20Viewing%20DFSR%20cmdlets%20-%20which%20works%20fine%0AImport-Module%20-Name%20DFSR%20-WarningAction%20SilentlyContinue%0AGet-Module%20-Name%20DFSR%20%0AGet-Command%20-Module%20DFSR%20%7C%20Measure-Object%0A%0A%23%204.%20Creating%20replication%20groups%0A%24RGHT1%20%3D%20%40%7B%0A%20%20GroupName%20%20%20%3D%20'SRVShareRG'%20%20%0A%20%20DomainName%20%20%3D%20'Reskit.Org'%0A%20%20Description%20%3D%20'Replication%20Group%20for%20SRV1%2C%20SRV2%20shares'%0A%7D%0ANew-DfsReplicationGroup%20%40RGHT1%3C%2FCODE%3E%3C%2FPRE%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThe%20final%20line%20gives%20me%20an%20error%3A%3C%2FP%3E%3CP%3ENew-DfsReplicationGroup%20%40RGHT1%3CBR%20%2F%3ENew-DfsReplicationGroup%3A%20Could%20not%20create%20the%20replication%20group%20named%20%22SRVShareRG%22.%20The%20specified%20domain%20does%20not%20exist%20or%20cannot%20be%20contacted.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EClues%3F%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2199590%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3ENetworking%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EStorage%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200436%22%20slang%3D%22en-US%22%3ERe%3A%20DFSR%20Fails%20toinstall%20a%20Replication%20Group%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200436%22%20slang%3D%22en-US%22%3EHi.%20What%20domain%20is%20the%20machine%20joined%20to%20where%20you%20are%20running%20this%20cmdlet%3F%20The%20error%20here%20is%20simply%20that%20an%20LDAP%20connection%20cannot%20be%20made%20to%20any%20DC%20in%20that%20domain%2C%20so%20I'd%20start%20with%20ensuring%20that%20DNS%20and%20DC%20connectivity%20in%20general%20are%20working%20there.%3C%2FLINGO-BODY%3E
Contributor

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.

 

Clues?

 

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.
www.000webhost.com