Remove-DfsrMember
Remove-DfsrMember
Removes computers from a replication group.
Syntax
Parameter Set: Default
Remove-DfsrMember [-GroupName] <String[]> [-ComputerName] <String[]> [[-Force]] [[-DomainName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed 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.
Parameters
-ComputerName<String[]>
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 (*).
Aliases |
MemberList,MemList |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
True (ByValue, ByPropertyName) |
Accept Wildcard Characters? |
true |
-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.
Aliases |
none |
Required? |
false |
Position? |
101 |
Default Value |
[Current Domain] |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Force
Forces the command to run without asking for user confirmation.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-GroupName<String[]>
Specifies an array of names of replication groups. You can use a comma separated list and the wildcard character (*).
Aliases |
RG,RgName |
Required? |
true |
Position? |
1 |
Default Value |
none |
Accept Pipeline Input? |
True (ByPropertyName) |
Accept Wildcard Characters? |
true |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- Microsoft.DistributedFileSystemReplication.DfsReplicationGroup
Outputs
The output type is the type of the objects that the cmdlet emits.
- [none]
Examples
Example 1: Remove a member from a group
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 the user for confirmation.
PS C:\> Remove-DfsrMember -GroupName "River Branch Office" -ComputerName "SRV02"
Example 2: Remove all members from a group
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 the user for confirmation.
PS C:\> Remove-DfsrMember -GroupName "RG07" -ComputerName * -Force