Export (0) Print
Expand All

New-DfsReplicationGroup

Windows Server 2012 R2 and Windows 8.1

Updated: October 17, 2013

Applies To: Windows 8.1, Windows PowerShell 4.0, Windows Server 2012 R2

New-DfsReplicationGroup

Creates a replication group.

Syntax

Parameter Set: Default
New-DfsReplicationGroup [-GroupName] <String[]> [[-Description] <String> ] [[-DomainName] <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The New-DfsReplicationGroup cmdlet creates a replication group. A replication group is a set of servers, or members, that participate in the replication of one or more folders. A replicated folder is kept synchronized among the members of a replication group. This cmdlet cannot modify resource group bandwidth or schedules.

Parameters

-Description<String>

Specifies a description for the replication group.


Aliases

none

Required?

false

Position?

2

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-DomainName<String>

Specifies a NetBIOS or fully qualified domain name (FQDN) for the Active Directory domain that contains a replication group. If you do not specify this parameter, the cmdlet uses the current domain.


Aliases

none

Required?

false

Position?

101

Default Value

[Current Domain]

Accept Pipeline Input?

True (ByPropertyName)

Accept Wildcard Characters?

false

-GroupName<String[]>

Specifies an array of names of replication groups.


Aliases

RG,RgName

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

True (ByValue, ByPropertyName)

Accept Wildcard Characters?

false

-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.

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.

  • Microsoft.DistributedFileSystemReplication.DfsReplicationGroup

Examples

Example 1: Create a replication group

This command creates a replication group named RG01.


PS C:\> New-DfsReplicationGroup -GroupName "RG01"
GroupName              : RG01
DomainName             : corp.contoso.com
Identifier             : 81251362-e30f-4c1e-b6b0-23906c1ebdd7
Description            : 
State                  : Normal

Example 2: Create a replication topology

This example creates a replication topology with an upstream server and two downstream servers.

The first command uses the New-DfsReplicationGroup cmdlet to create a replication group with the name Branch Office 1. The command pipes the output to the New-DfsReplicatedFolder cmdlet to create a replicated folder with the name Data Distribution 1. The command pipes the output to the Add-DfsrMember cmdlet to add the member servers named SRV01, SRV02, and SRV03. The command formats the output of the pipeline as a table.

The second command uses the Add-DfsrConnection cmdlet to add bidirectional connections between servers SRV01 and SRV02.

The third command uses the Add-DfsrConnection cmdlet to add bidirectional connections between servers SRV01 and SRV03.

The fourth command uses the Set-DfsrMembership cmdlet to set SRV01 as the primary member.

The fifth command uses the Set-DfsrMembership cmdlet to set membership for servers SRV02 and SRV03.


PS C:\> New-DfsReplicationGroup -GroupName "Branch Office 1" | New-DfsReplicatedFolder -FolderName "Data Distribution 1" | Add-DfsrMember -ComputerName SRV01, SRV02, SRV03 | Format-Table dnsname,groupname -auto -wrap
DnsName               GroupName
-------               ---------
SRV01.corp.contoso.com Branch Office 1
SRV02.corp.contoso.com Branch Office 1
SRV03.corp.contoso.com Branch Office 1
PS C:\> Add-DfsrConnection -GroupName "Branch Office 1" -SourceComputerName SRV01 -DestinationComputerName SRV02 | Format-Table *name -wrap -auto
GroupName       SourceComputerName DestinationComputerName
---------       ------------------ -----------------------
Branch Office 1 SRV01               SRV02
Branch Office 1 SRV02               SRV01
PS C:\> Add-DfsrConnection -GroupName "Branch Office 1" -SourceComputerName SRV01 -DestinationComputerName SRV03 | Format-Table *name -wrap -auto
GroupName       SourceComputerName DestinationComputerName
---------       ------------------ -----------------------
Branch Office 1 SRV01               SRV03
Branch Office 1 SRV03               SRV01
PS C:\> Set-DfsrMembership -GroupName "Branch Office 1" -FolderName "Data Distribution 1" -ContentPath c:\Rf01 -ComputerName SRV01 -PrimaryMember $True -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap
DomainName       GroupName       FolderName          ComputerName ContentPath StagingPath                PrimaryMember
----------       ---------       ----------          ------------ ----------- -----------                -------------
corp.contoso.com Branch Office 1 Data Distribution 1 SRV01         c:\Rf01      c:\Rf01\DfsrPrivate\Staging          True
PS C:\> Set-DfsrMembership -GroupName "Branch Office 1" -FolderName "Data Distribution 1" -ContentPath c:\Rf01 -ComputerName SRV02,SRV03 -StagingPathQuotaInMB 16384 -Force | Format-Table *name,*path,primary* -auto -wrap
DomainName       GroupName       FolderName          ComputerName ContentPath StagingPath                PrimaryMember
----------       ---------       ----------          ------------ ----------- -----------                -------------
corp.contoso.com Branch Office 1 Data Distribution 1 SRV02         c:\Rf01      c:\Rf01\DfsrPrivate\Staging         False
corp.contoso.com Branch Office 1 Data Distribution 1 SRV03         c:\Rf01      c:\Rf01\DfsrPrivate\Staging         False

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft