Edit

Share via


Remove-DfsrMember

Removes computers from a replication group.

Syntax

Remove-DfsrMember
      [-GroupName] <String[]>
      [-ComputerName] <String[]>
      [-Force]
      [[-DomainName] <String>]
      [-WhatIf]
      [-Confirm]
      [<CommonParameters>]

Description

The Remove-DfsrMember cmdlet removes member computers from a replication group. Members of a replication group host replicated folders. If you remove a member from its replication group, Distributed File System (DFS) Replication stops replication on that member. This cmdlet does not delete the contents of replicated folders or their private data. Use the Add-DfsrMember to add member computers to a group.

Examples

Example 1: Remove a member from a group

PS C:\> Remove-DfsrMember -GroupName "River Branch Office" -ComputerName "SRV02"
This operation will remove the computer and all of its memberships and connections. 
Computer: SRV02 Replication group:"River Branch Office" 
Are you sure you want to continue to remove this computer from its replication group and all of its memberships and
connections?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"):

This command removes the member computer named SRV02 from the River Branch Office replication group. Because this example does not include the Force parameter, the command prompts you for confirmation.

Example 2: Remove all members from a group

PS C:\> Remove-DfsrMember -GroupName "RG07" -ComputerName * -Force

This command removes all the member computers from the replication group named RG07. Because the command includes the Force parameter, it removes the members without prompting for confirmation.

Parameters

-ComputerName

Specifies an array of names of member computers. The cmdlet removes these members from the replication group. You can use a comma separated list and the wildcard character (*).

Type:String[]
Aliases:MemberList, MemList
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DomainName

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.

Type:String
Position:100
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-Force

Forces the command to run without asking for user confirmation.

Type:SwitchParameter
Position:2
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-GroupName

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

Type:String[]
Aliases:RG, RgName
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:True

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

Microsoft.DistributedFileSystemReplication.DfsReplicationGroup

Outputs

None