Set-DfsReplicatedFolder

Changes settings of a replicated folder.

Syntax

Set-DfsReplicatedFolder
   [-GroupName] <String[]>
   [[-FolderName] <String[]>]
   [[-Description] <String>]
   [[-FileNameToExclude] <String[]>]
   [[-DirectoryNameToExclude] <String[]>]
   [[-DfsnPath] <String>]
   [[-DomainName] <String>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-DfsReplicatedFolder cmdlet changes settings of a replicated folder in a replication group. You can use this cmdlet to modify global settings of replicated folders such as filters and Distributed File System (DFS) Namespace associations. Replicated folders are logical arrangements of replication that do not contain computer-specific settings.

Examples

Example 1: Add a description to a replicated folder

PS C:\> Set-DfsReplicatedFolder -GroupName "RG11" -FolderName "RF101" -Description "Branch Store #101, Data Collection for Backups"
GroupName              : RG11
FolderName             : RF101
DomainName             : corp.contoso.com
Identifier             : c335e8f6-bc3e-4671-8f7b-9cdc51a6b222
Description            : Branch Store #101 Data Collection for Backups
FileNameToExclude      : {~*, *.bak, *.tmp}
DirectoryNameToExclude : {}
DfsnPath               :
IsDfsnPathPublished    : False
State                  : Normal

This command sets a new description on the replicated folder named RF101 in the replication group named RG11.

Example 2: Exclude files on all replicated folders

PS C:\> Set-DfsReplicatedFolder -GroupName "RG11" -FolderName * -FileNameToExclude "~*, *.bak, *.tmp, *.ned"
GroupName              : RG11
FolderName             : RF11
DomainName             : corp.contoso.com
Identifier             : c335e8f6-bc3e-4671-8f7b-9cdc51a6b222
Description            :
FileNameToExclude      : {~*, *.bak, *.tmp, *.ned}
DirectoryNameToExclude : {}
DfsnPath               :
IsDfsnPathPublished    : False
State                  : Normal

GroupName              : RG11
FolderName             : rf12
DomainName             : corp.contoso.com
Identifier             : 50e057af-08a4-4dbb-af1c-3765620afd9e
Description            :
FileNameToExclude      : {~*, *.bak, *.tmp, *.ned}
DirectoryNameToExclude : {}
DfsnPath               :
State                  : Normal

IsDfsnPathPublished    : False

GroupName              : RG11
FolderName             : rf101
DomainName             : corp.contoso.com
Identifier             : c335e8f6-bc3e-4671-8f7b-9cdc51a6b222
Description            : Branch Store #101 Data Collection for Backups
FileNameToExclude      : {~*, *.bak, *.tmp, *.ned}
DirectoryNameToExclude : {}
DfsnPath               :
IsDfsnPathPublished    : False
State                  : Normal

This command sets the list of files to exclude from replication for all replicated folders in the RG11 replication group. The command specifies that the DFS Replication service exclude file names starting with a tilde (~) character and files that have the extensions .bak, .tmp, and .ned from replication.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Description

Specifies a description for the replicated folder.

Type:String
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DfsnPath

Specifies the DFS Namespace folder path of the replicated folder.

This parameter is used to connect the replication group to the replicated folder.

Type:String
Position:5
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DirectoryNameToExclude

Specifies an array of names of subfolders that the DSFR service excludes and does not replicate in the replicated folder. You must provide only folder names, not full paths. You can use wildcards.

Type:String[]
Aliases:DirectoryFilter
Position:4
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DomainName

Specifies the NetBIOS name or fully qualified domain name (FQDN) for the Active Directory Domain Service (AD DS) domain that contains the replication group. If you do not specify this parameter, the cmdlet uses the domain of the current user.

Type:String
Position:100
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-FileNameToExclude

Specifies an array of names and extensions of files that the DSFR service excludes and does not replicate. You must provide only file names, not full paths. You can use wildcards.

Type:String[]
Aliases:FileFilter
Position:3
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-FolderName

Specifies an array of names of replicated folders. You can use a comma separated list and the wildcard character (*). If you do not specify this parameter, the cmdlet gets all replicated folders.

Type:String[]
Aliases:RF, RfName
Position:1
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:True

-GroupName

Specifies an array of names of replication groups. You can use a comma separated list and the wildcard character (*).

Type:String[]
Aliases:RG, RgName
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.DistributedFileSystemReplication.DfsReplicationGroup, Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

Outputs

Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder