Automating creation of new DFSR folders

Hello,

I am trying to automate the creation of new DFSR folders. I found that the cmdlet New-DfsReplicatedFolder is doing the job just fine. The issue is that I cannot find a way to modify some of the properties of the replicated folder such as: Staging path, Staging Quota and Quota for Conflict and Deleted.

Could you please help?

full disclosure I don’t know that much about DFS, especially when it related to Powershell, but I put your cmdlet into Microsoft’s website and then did a ctrl+f for “staging” and found this example:

#The fourth command uses the **Set-DfsrMembership** cmdlet to configure membership settings for the primary member of the replication group named Branch Office 1. The command specifies that the computer named SRV01 is the primary member of the group. The command sets an appropriate quota size of the staging folder instead of the lower default.
PS C:\> Set-DfsrMembership -GroupName "Branch Office 1" -FolderName "Data Distribution 1" -ContentPath "C:\rf1" -ComputerName "SRV01" -PrimaryMember $True -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap

heading over to the page for that cmdlet the syntax example looks like this might cover what you want:

Set-DfsrMembership -GroupName "RG22" -FolderName "RepFolder" -ComputerName "SRV07" -StagingPathQuotaInMB 32768 -ConflictAndDeletedQuotaInMB 4096 
GroupName                   : RG22
ComputerName                : SRV07
FolderName                  : RF01
GroupDomainName             : corp.contoso.com
ComputerDomainName          : corp.contoso.com
Identifier                  : 9931c757-b252-4f04-8347-53575610c423
DistinguishedName           : CN=72c0c2bc-8a4e-4984-a23c-2efadc238724,CN=957751c2-15f0-429b-8688-44c22044226d,CN=DFSR-L
                              ocalSettings,CN=SRV07,OU=Domain Controllers,DC=corp,DC=contoso,DC=com
ContentPath                 : c:\rf01
PrimaryMember               : False
StagingPath                 : c:\rf01\DfsrPrivate\Staging
StagingPathQuotaInMB        : 32768
MinimumStagingFileSize      : Size256KB
ConflictAndDeletedPath      : c:\rf01\DfsrPrivate\ConflictAndDeleted
ConflictAndDeletedQuotaInMB : 4096
ReadOnly                    : False
RemoveDeletedFiles          : False
Enabled                     : True
DfsnPath                    : 
State                       : Normal

Check it out: Set-DfsrMembership

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.