Set-DfsrMembership
Set-DfsrMembership
Configures membership settings for replication group members.
Sintassi
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>]
Descrizione dettagliata
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.
Parametri
-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 (*).
Alias |
MemberList,MemList |
Obbligatorio? |
true |
Posizione? |
3 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
8 |
Valore predefinito |
660 |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-ContentPath<String>
Specifies a local folder to contain replicated files associated with the replicated folder specified by using the FolderName parameter.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
4 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
13 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
11 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
101 |
Valore predefinito |
[Current Domain] |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
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 (*).
Alias |
RF,RfName |
Obbligatorio? |
true |
Posizione? |
2 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByPropertyName) |
Accetta caratteri jolly? |
false |
-Force
Forza l'esecuzione del comando senza chiedere conferma all'utente.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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 (*).
Alias |
RG,RgName |
Obbligatorio? |
true |
Posizione? |
1 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
True (ByValue, ByPropertyName) |
Accetta caratteri jolly? |
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.
I valori accettabili per questo parametro sono:
-- 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)
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
12 |
Valore predefinito |
256KB |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
5 |
Valore predefinito |
false |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
9 |
Valore predefinito |
false |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
10 |
Valore predefinito |
false |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
6 |
Valore predefinito |
nessuno |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
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.
Alias |
nessuno |
Obbligatorio? |
false |
Posizione? |
7 |
Valore predefinito |
4096 |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-Confirm
Richiede conferma prima di eseguire il cmdlet.
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
False |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
-WhatIf
Mostra gli effetti dell'esecuzione del cmdlet. Il cmdlet non viene eseguito.
Obbligatorio? |
false |
Posizione? |
named |
Valore predefinito |
False |
Accetta input da pipeline? |
false |
Accetta caratteri jolly? |
false |
<CommonParameters>
Questo cmdlet supporta i parametri comuni: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Per altre informazioni, vedere about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Input
Il tipo di input è il tipo degli oggetti che è possibile reindirizzare al cmdlet.
- Microsoft.DistributedFileSystemReplication.DfsReplicationGroup, Microsoft.DistributedFileSystemReplication.DfsReplicatedFolder, string
Output
Il tipo di output corrisponde al tipo di oggetti generati dal cmdlet.
- Microsoft.DistributedFileSystemReplication.DfsrMembership
Esempi
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