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

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, string

출력

출력 유형은 cmdlet이 내보내는 개체의 유형입니다.

  • 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