Add-DfsrMember

Add-DfsrMember

Adds computers to a replication group.

Sintaxis

Parameter Set: Default
Add-DfsrMember [-GroupName] <String[]> [-ComputerName] <String[]> [[-Description] <String> ] [[-DomainName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]

Descripción detallada

The Add-DfsrMember cmdlet adds computers to a replication group as members. Members of a replication group host replicated folders. You can specify a description for member computers. Use the Remove-DfsrMember cmdlet to remove members of a replication group.

Parámetros

-ComputerName<String[]>

Specifies an array of names of computers. The cmdlet adds these computers to the replication group specified by the GroupName parameter. You can use a comma separated list and the wildcard character (*).

Alias

MemberList,MemList

¿Requerido?

true

¿Posición?

2

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-Description<String>

Specifies a description for a member computer.

Alias

ninguno

¿Requerido?

false

¿Posición?

3

Valor predeterminado

ninguno

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

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

ninguno

¿Requerido?

false

¿Posición?

101

Valor predeterminado

[Current Domain]

¿Aceptar canalización?

True (ByPropertyName)

¿Aceptar caracteres comodín?

false

-GroupName<String[]>

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

Alias

RG,RgName

¿Requerido?

true

¿Posición?

1

Valor predeterminado

ninguno

¿Aceptar canalización?

True (ByValue, ByPropertyName)

¿Aceptar caracteres comodín?

false

-Confirm

Solicita confirmación antes de ejecutar el cmdlet.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

-WhatIf

Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.

¿Requerido?

false

¿Posición?

named

Valor predeterminado

falso

¿Aceptar canalización?

false

¿Aceptar caracteres comodín?

false

<CommonParameters>

Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Entradas

El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.

  • Microsoft.DistributedFileSystemReplication.DfsReplicationGroup

Salidas

El tipo de resultado es el tipo de objetos que emite el cmdlet.

  • Microsoft.DistributedFileSystemReplication.DfsrMember

Ejemplos

Example 1: Add a member to a replication group

This command adds the computer named SRV07 to replication group named RG01. The console displays the new DfsrMember object.

PS C:\> Add-DfsrMember -GroupName "RG01" -ComputerName "SRV07"

Example 2: Add multiple members to a new 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 by using the Set-DfsrMembership cmdlet. 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

Temas relacionados

Get-DfsrMember

Remove-DfsrMember

Set-DfsrMember

New-DfsReplicationGroup

New-DfsReplicatedFolder

Set-DfsrMembership