Set-DfsReplicatedFolder

Set-DfsReplicatedFolder

Changes settings of a replicated folder.

语法

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

详细说明

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.

参数

-Description<String>

Specifies a description for the replicated folder.

别名

是否为必需?

false

位置?

3

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

是否为必需?

false

位置?

6

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

DirectoryFilter

是否为必需?

false

位置?

5

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

是否为必需?

false

位置?

101

默认值

[Current Domain]

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

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.

别名

FileFilter

是否为必需?

false

位置?

4

默认值

是否接受管道输入?

false

是否接受通配符?

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.

别名

RF,RfName

是否为必需?

false

位置?

2

默认值

是否接受管道输入?

True (ByPropertyName)

是否接受通配符?

false

-GroupName<String[]>

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

别名

RG,RgName

是否为必需?

true

位置?

1

默认值

是否接受管道输入?

True (ByValue, ByPropertyName)

是否接受通配符?

false

-Confirm

运行 cmdlet 之前提示你进行确认。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

-WhatIf

显示如果运行 cmdlet 则会发生什么情况。cmdlet 未运行。

是否为必需?

false

位置?

named

默认值

false

是否接受管道输入?

false

是否接受通配符?

false

<CommonParameters>

此 cmdlet 支持通用参数:-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer 和 -OutVariable。有关详细信息,请参阅 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

输入

输入类型是指可通过管道传送给 cmdlet 的对象的类型。

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

输出

输出类型是 cmdlet 所发出对象的类型。

  • Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder

示例

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"

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"

相关主题

Get-DfsReplicatedFolder

New-DfsReplicatedFolder

Remove-DfsReplicatedFolder