Set-DfsrMembership

Set-DfsrMembership

Configures membership settings for replication group members.

構文

Parameter Set: Default
Set-DfsrMembership [-GroupName] <String[]> [-FolderName] <String[]> [-ComputerName] <String[]> [[-ContentPath] <String> ] [[-PrimaryMember] <Boolean> ] [[-StagingPath] <String> ] [[-StagingPathQuotaInMB] <UInt32> ] [[-ConflictAndDeletedQuotaInMB] <UInt32> ] [[-ReadOnly] <Boolean> ] [[-RemoveDeletedFiles] <Boolean> ] [[-DisableMembership] <Boolean> ] [[-MinimumFileStagingSize] <FileStagingSize> ] [[-DfsnPath] <String> ] [[-DomainName] <String> ] [-Force] [-Confirm] [-WhatIf] [ <CommonParameters>]

詳細説明

The Set-DfsrMembership cmdlet configures membership settings for Distributed File System (DFS) Replication group members. Members of a replication group host replicated folders. Use the Add-DfsrMember cmdlet to add a member to a group. Adding a member creates a membership that contains default values. After you add a member, you can use the current cmdlet to modify membership settings.

Use this cmdlet to specify the name and location of a replicated folder and whether a replicated folder is read-only. You can specify a member computer as the primary member of its group.

You can also specify how much disk space the member computer allocates for its ConflictsAndDeleted folder and whether to copy deleted replicated files to that folder. You can specify a staging folder and its maximum size and the smallest file that DSF Replication stages during outbound replication.

You can disable replication for a member computer by using this cmdlet, but to pause replication, disable the connections by using the Remove-DfsrConnection cmdlet on the member or use the Suspend-DfsReplicationGroup cmdlet.

パラメーター

-ComputerName<String[]>

Specifies an array of names of member computers. The cmdlet modifies membership settings for these member computers. You can use a comma separated list and the wildcard character (*).

エイリアス

MemberList,MemList

必須?

true

位置は?

3

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-ConflictAndDeletedQuotaInMB<UInt32>

Specifies the maximum size, in megabytes, for the ConflictsAndDeleted folder. The default value is 4096 MB.

When the size of this folder reaches a specified percent of the quota value, DFS Replication deletes the oldest files in the folder. The default value is 90 percent. DFS Replication continues to delete files until the size of the folder reaches a specified percent of the quota value. The default value is 60 percent. Use the Set-DfsrServiceConfiguration cmdlet to modify the percent values.

エイリアス

なし

必須?

false

位置は?

8

既定値

660

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ContentPath<String>

Specifies a local folder to contain replicated files associated with the replicated folder specified by using the FolderName parameter.

エイリアス

なし

必須?

false

位置は?

4

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DfsnPath<String>

Specifies the DFS Namespace (DFSN) folder path of the membership. You can use this value to keep track of the DFSN folder path. This value does not affect replication.

エイリアス

なし

必須?

false

位置は?

13

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DisableMembership<Boolean>

Indicates whether to disable the membership for a replication folder in a replication group.

If you disable membership, DFS Replication stops replicating content on this computer, but does not delete the replicated folder or its private replication data. If you re-enable membership, you will lose any private data and can lose replicated data. You may be able to recover replicated data by using the Restore-DfsrPreservedFiles cmdlet. By default, memberships are enabled.

If you want to temporarily pause replication, disable the connections on the member by using the Set-DfsrConnection cmdlet or use the Suspend-DfsReplicationGroup cmdlet.

エイリアス

なし

必須?

false

位置は?

11

既定値

なし

パイプライン入力を許可する

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

-FolderName<String[]>

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

エイリアス

RF,RfName

必須?

true

位置は?

2

既定値

なし

パイプライン入力を許可する

True (ByPropertyName)

ワイルドカード文字を許可する

false

-Force

ユーザーの確認を求めずにコマンドを強制的に実行します。

エイリアス

なし

必須?

false

位置は?

named

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-GroupName<String[]>

Specifies an array of names of replication groups. If you do not specify this parameter, the cmdlet applies to all participating replication groups. You can use a comma separated list and the wildcard character (*).

エイリアス

RG,RgName

必須?

true

位置は?

1

既定値

なし

パイプライン入力を許可する

True (ByValue, ByPropertyName)

ワイルドカード文字を許可する

false

-MinimumFileStagingSize<FileStagingSize>

Specifies the minimum file size that DFS Replication stages during outbound replication. By default, this value is 256 KB. If you also disable Remote Differential Compression (RDC), files smaller than this size replicate without staging. On high-bandwidth, low-latency networks like LANs and high-speed WANs, this typically results in faster replication, at the cost of higher bandwidth saturation. You can use the Set-DfsrConnection cmdlet to disable or enable RDC.

Windows Server® 2012 and previous versions of the Windows operating system do not support the file size setting. Previous versions of the Windows operating system that support DFS Replication use a hard-coded 256 KB minimum staging size.

このパラメーターに対して使用できる値:

-- Size256KB (0)
-- Size512KB (1)
-- Size1MB (2)
-- Size2MB (3)
-- Size4MB (4)
-- Size8MB (5)
-- Size16MB (6)
-- Size32MB (7)
-- Size64MB (8)
-- Size128MB (9)
-- Size256MB (10)
-- Size512MB (11)
-- Size1GB (12)
-- Size2GB (13)
-- Size4GB (14)
-- Size8GB (15)
-- Size16GB (16)
-- Size32GB (17)
-- Size64GB (18)
-- Size128GB (19)
-- Size256GB (20)
-- Size512GB (21)
-- Size1TB (22)
-- Size2TB (23)
-- Size4TB (24)
-- Size8TB (25)
-- Size16TB (26)
-- Size32TB (27)
-- Size64TB (28)
-- Size128TB (29)
-- Size256TB (30)
-- Size512TB (31)

エイリアス

なし

必須?

false

位置は?

12

既定値

256KB

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PrimaryMember<Boolean>

Indicates whether this member computer is the primary member of a group. Specify one and only one membership in each replication group as primary. By default, members are not primary.

If you specify a value of $True for this parameter, do not specify a value of $True for the ReadOnly parameter.

エイリアス

なし

必須?

false

位置は?

5

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ReadOnly<Boolean>

Indicates whether a replicated folder is read-only. By default, memberships are read/write.

If you change a read/write folder to read-only or change a read-only folder to read/write, DFS Replication moves any local unreplicated changes to the ConflictAndDeleted folder. You may be able to restore these changes by using the Restore-DfsrPreservedFiles cmdlet.

If you specify a value of $True for this parameter, do not specify a value of $True for the PrimaryMember parameter.

エイリアス

なし

必須?

false

位置は?

9

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RemoveDeletedFiles<Boolean>

Indicates whether the member computer deletes files and folders immediately following inbound replication. If this parameter has a value of $False, the member moves deleted files and folders to the ConflictAndDeleted folder when the deletion replicates inbound. The originating server always deletes files without preservation. You can use the Restore-DfsrPreservedFiles cmdlet to restore deleted files while they still exist in the ConflictAndDeleted folder. If this parameter has a value of $True, when a replicating member replicates a deletion, it deletes the local copy of the file immediately. If you do not specify this parameter, by default, DFS Replication preserves deleted files.

エイリアス

なし

必須?

false

位置は?

10

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-StagingPath<String>

Specifies a local folder for staging content. If you do not specify this parameter, DFS Replication creates a folder named <replicated folder>\DfsrPrivate\Staging.

エイリアス

なし

必須?

false

位置は?

6

既定値

なし

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-StagingPathQuotaInMB<UInt32>

Specifies the maximum size, in megabytes, of a staging folder. Memberships have a default value is 4096 MB. When the size of this folder reaches a specified percent, by default, 90, of the quota value, DFS Replication deletes the oldest files in the folder. DFS Replication continues to delete files until the size of the folder reaches a specified percent, by default, 60, of the quota value. Use the Set-DfsrServiceConfiguration cmdlet to modify the percent values.

If you choose a larger quota, the member computer keeps staged data for longer periods, which provides better replication performance.

エイリアス

なし

必須?

false

位置は?

7

既定値

4096

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Confirm

コマンドレットを実行する前に、ユーザーに確認を求めます。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-WhatIf

コマンドレットを実行するとどのような結果になるかを表示します。コマンドレットは実行されません。

必須?

false

位置は?

named

既定値

false

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

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

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Microsoft.DistributedFileSystemReplication.DfsrMembership

Example 1: Change membership settings

This command changes settings for a replication folder on a computer named SRV07 that belongs to a group named RG22. The command sets the staging folder quota to 32768 MB and the ConflictAndDeleted folder quota to 4096 MB. The console displays the membership object, which includes the new values for the settings.

PS C:\> Set-DfsrMembership -GroupName "RG22" -FolderName "RepFolder" -ComputerName "SRV07" -StagingPathQuotaInMB 32768 -ConflictAndDeletedQuotaInMB 4096 

Example 2: Create a replication group

This example sets up a replication group called River Branch Office. The group consists of three computers, a primary member named SRV01 and two other computers named SRV02 and SRV03. The example specifies a replication folder and establishes connections between the members. The example also specifies the maximum size of the staging folder.

Each command returns the appropriate object or objects. This example uses the Format-Table cmdlet to format output in the console. For more information, type Get-Help Format-Table.

The first command creates a replication group, specifies a replicated folder, and adds three computers to the group as members. The command creates a replication group named River Branch Office by using the New-DfsReplicationGroup cmdlet. The command passes the new group to the New-DfsReplicatedFolder cmdlet by using the pipeline operator. That cmdlet creates a replicated folder named Data Distribution 01. The command adds three computers, named SRV01, SRV02, and SRV03, to the new replication group.

PS C:\> New-DfsReplicationGroup -GroupName "River Branch Office" | New-DfsReplicatedFolder -FolderName "Data Distribution 01" | Add-DfsrMember -ComputerName "SRV01","SRV02","SRV03" | Format-Table dnsname,groupname -auto -wrap

The second command adds a connection between the source computer named SRV01 and the destination computer named SRV02 by using the Add-DfsrConnection cmdlet.

PS C:\> Add-DfsrConnection -GroupName "River Branch Office" -SourceComputerName "SRV01" -DestinationComputerName "SRV02" | Format-Table *name -wrap -auto

The third command adds a connection between the source computer named SRV01 and the destination computer named SRV03.

PS C:\> Add-DfsrConnection -GroupName "River Branch Office" -SourceComputerName "SRV01" -DestinationComputerName "SRV03" | Format-Table *name -wrap -auto

The fourth command makes the computer named SRV01 the primary member of the group. The command also specifies Data Distribution 01 as the name of the replicated folder in the location C:\RF01. The command specifies the staging folder quota as 16384 MB. The command includes the Force parameter, and, therefore, does not prompt the user for confirmation.

PS C:\> Set-DfsrMembership -GroupName "River Branch Office" -FolderName "Data Distribution 01" -ContentPath "C:\RF01" -ComputerName "SRV01" -PrimaryMember $True -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap

The fifth command modifies values for the computers named SRV02 and SRV03. The command specifies Data Distribution 01 as the name of the replicated folder in the location C:\RF01. The command specifies the staging folder quota as 16384 MB. The command includes the Force parameter, and, therefore, does not prompt the user for confirmation.

Unlike the previous command, this command does not specify a value of the PrimaryMember parameter. The computers named SRV02 and SRV03 have the default value of $False for the setting.

PS C:\> Set-DfsrMembership -GroupName "River Branch Office" -FolderName "Data Distribution 1" -ContentPath "C:\RF01" -ComputerName "SRV02","SRV03" -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap

関連トピック

Get-DfsrMembership

Add-DfsrMember

Set-DfsrServiceConfiguration

Restore-DfsrPreservedFiles

Suspend-DfsReplicationGroup

Add-DfsrConnection

Remove-DfsrConnection

Set-DfsrConnection

New-DfsReplicationGroup

New-DfsReplicatedFolder