Adding another server to replication group via xDFS

Welcome Forums DSC (Desired State Configuration) Adding another server to replication group via xDFS

This topic contains 1 reply, has 1 voice, and was last updated by

 
Participant
1 year, 11 months ago.

  • Author
    Posts
  • #72289

    Participant
    Topics: 3
    Replies: 3
    Points: 0
    Rank: Member

    All,

    I have three servers, all domain members, that need to be a part of the same DFS replication group. Two servers are already in the replication group, but I would like to add the third automatically via DSC using the xdfs module. I can add the server via powershell like so:

    Add-DfsrMember -ComputerName server3 -GroupName storage
    Add-DfsrConnection -DestinationComputerName server3 -GroupName storage -SourceComputerName server1 -DomainName domain.com
    Add-DfsrConnection -DestinationComputerName server3 -GroupName storage -SourceComputerName server2 -DomainName domain.com
    Set-DfsrMembership -GroupName "storage" -FolderName "storage" -ComputerName server3 -ContentPath D:\storage
    

    My DSC code is like this but doesn't work:

            xDFSReplicationGroup storage
            {
                GroupName = 'storage'
                Ensure = 'Present'
                Members = 'server1.domain.com','server2.domain.com','server3.domain.com'
                Folders = 'storage'
                PSDSCRunAsCredential = $Credential
                DependsOn = '[WindowsFeature]RSATDFSMgmt'
            }
    
            xDFSReplicationGroupConnection storage1
            {
                GroupName = 'storage'
                Ensure = 'Present'
                SourceComputerName = 'server1.domain.com'
                DestinationComputerName = 'server3.domain.com'
                PSDSCRunAsCredential = $Credential
            }
    
            xDFSReplicationGroupConnection storage2
            {
                GroupName = 'storage'
                Ensure = 'Present'
                SourceComputerName = 'server2.domain.com'
                DestinationComputerName = 'server3.domain.com'
                PSDSCRunAsCredential = $Credential
            }
    
            xDFSReplicationGroupFolder storagefolder
            {
                GroupName = 'storage'
                FolderName = 'storage'
                PSDSCRunAsCredential = $Credential
                DependsOn = '[xDFSReplicationGroup]storage'
            }
    
            xDFSReplicationGroupMembership server3
            {
                GroupName = 'storage'
                FolderName = 'storage'
                ComputerName = 'server3.domain.com'
                ContentPath = 'd:\storage'
                PSDSCRunAsCredential = $Credential
                DependsOn = '[xDFSReplicationGroupFolder]storageFolder'
            }
    

    However, I can not seem to follow how to do this with DSC. any help would be greatly appreciated.

  • #72670

    Participant
    Topics: 3
    Replies: 3
    Points: 0
    Rank: Member

    Thanks for the help, but the code actually works. I guess AWS didn't want it to work that day. Oh well.

The topic ‘Adding another server to replication group via xDFS’ is closed to new replies.

denizli escort samsun escort muğla escort ataşehir escort kuşadası escort