How to Turn off DFSR 'Move deleted files to Conflicts and Deleted Folder

Tagged: 

This topic contains 3 replies, has 2 voices, and was last updated by Profile photo of Kreston Yates Kreston Yates 10 months ago.

  • Author
    Posts
  • #34917
    Profile photo of Kreston Yates
    Kreston Yates
    Participant

    Anyone know how to use Powershell to deselect the "Move deleted files to Conflict and Deleted folder" ? From the GUI its in the advanced tab of the replication memberships properties. I haven't been able to figure it out.

  • #34945
    Profile photo of Matt Bloomfield
    Matt Bloomfield
    Participant

    I can't see a way to do this with any of the cmdlets but poking about with ADSIEdit and the AD provider I've found that unchecking the box changes the msDFSR-Options attribute value from 0 to 2.

    If you navigate to the DSFR-LocalSettings container which you'll find in the Computer object container you can use Set-ItemProperty to change the value:

    cd AD:                   
    cd '.\DC=contoso,DC=com'      
    cd '.\OU=Domain Controllers'
    cd .\CN=LU-DC1
    cd .\CN=DFSR-LocalSettings
    cd .\CN=bce541f3-affb-4529-a68a-91629cc6e4af
    Set-ItemProperty -Path .\CN=bce541f3-affb-4529-a68a-91629cc6e4af -Name msDFSR-Options -Value 2
    
  • #34979
    Profile photo of Kreston Yates
    Kreston Yates
    Participant

    Matt,

    Thanks for the reply. I never would have found that. Appreciate your help on this one.

    Kreston

  • #34980
    Profile photo of Kreston Yates
    Kreston Yates
    Participant

    My Script to change all DFSR replicated folder to not use conflicts and deleted

    $WEB01 = "ServerName"
            Set-Location "AD:\CN=DFSR-LocalSettings,CN=$WEB1,CN=Computers,DC=domain,DC=com"
            $DFSRSHARES = Get-ADObject -Identity "CN=DFSR-LocalSettings,CN=$WEB1,CN=Computers,DC=domain,DC=com" | Get-ChildItem | Select-Object Name -ExpandProperty Name | Out-File C:\Temp\\DFSR_Repl_Web1.txt
            $DFSRSHARES = Get-Content C:\Temp\DFSR_Repl_Web1.txt
            ForEach ($DFSRSHARE in $DFSRSHARES)
                {
                    $Subscription = Get-ChildItem -Path "AD:\CN=$DFSRSHARE,CN=DFSR-LocalSettings,CN=$WEB1,CN=Computers,DC=domain,DC=com"  | Select-Object Name -ExpandProperty Name
                    Set-ItemProperty -Path "AD:\CN=$Subscription,CN=$DFSRSHARE,CN=DFSR-LocalSettings,CN=$WEB1,CN=Computers,DC=domain,DC=com" -Name msDFSR-Options -Value 2
                }
    
    
    
    

You must be logged in to reply to this topic.