Export (0) Print
Expand All

Set-DfsReplicatedFolder

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

Set-DfsReplicatedFolder

Changes settings of a replicated folder.

Syntax

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




Detailed 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 DFS Namespace associations. Replicated folders are logical arrangements of replication that do not contain computer-specific settings.

Parameters

-Description<String>

Specifies a description for the replicated folder.


Aliases

none

Required?

false

Position?

3

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DfsnPath<String>

Specifies the DFS Namespace (DFSN) folder path of the replicated folder.

The DFSN 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.


Aliases

none

Required?

false

Position?

6

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DirectoryNameToExclude<String[]>

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 wild cards.


Aliases

DirectoryFilter

Required?

false

Position?

5

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DomainName<String>

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.


Aliases

none

Required?

false

Position?

101

Default Value

[Current Domain]

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-FileNameToExclude<String[]>

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.


Aliases

FileFilter

Required?

false

Position?

4

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-FolderName<String[]>

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.


Aliases

RF,RfName

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-GroupName<String[]>

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


Aliases

RG,RgName

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

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

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.DistributedFileSystemReplication.DfsReplicationGroup, Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

Outputs

The output type is the type of the objects that the cmdlet emits.

  • Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

Examples

Example 1: Add a description to a replicated folder

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


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

Example 2: Exclude files on all replicated folders

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.


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

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft