Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Set-DfsReplicatedFolder

Last Updated: 3/26/2017

SYNOPSIS

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
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Description

Specifies a description for the replicated folder.

Type: String
Parameter Sets: (All)
Aliases: 

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

-DfsnPath

Specifies the DFS Namespace folder path of the replicated folder.

The DFS Namespace folder path has no effect on replication. This property exists only as a descriptive convenience to administrators and DFS Replication service does not validate the value of this property.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: 5
Default value: None
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[]
Parameter Sets: (All)
Aliases: DirectoryFilter

Required: False
Position: 4
Default value: None
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
Parameter Sets: (All)
Aliases: 

Required: False
Position: 100
Default value: None
Accept pipeline input: True (ByPropertyName)
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[]
Parameter Sets: (All)
Aliases: FileFilter

Required: False
Position: 3
Default value: None
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[]
Parameter Sets: (All)
Aliases: RF, RfName

Required: False
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-GroupName

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

Type: String[]
Parameter Sets: (All)
Aliases: RG, RgName

Required: True
Position: 0
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

-WhatIf

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

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

Microsoft.DistributedFileSystemReplication.DfsReplicationGroup, Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

OUTPUTS

Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

NOTES

Get-DfsReplicatedFolder

New-DfsReplicatedFolder

Remove-DfsReplicatedFolder

© 2017 Microsoft