Commands › Exchange Online

Set-DatabaseAvailabilityGroupNetwork

Exchange Online ExchangeOnlineManagement Set-*

Configure a network for a database availability group (DAG).

Quick start script

# Set-DatabaseAvailabilityGroupNetwork — quick start (serv365.ai)
# 1. Connect (app-only shown; interactive: omit the certificate parameters)
Connect-ExchangeOnline -CertificateThumbprint $thumb -AppId $appId -Organization $org

# 2. Capture the current state first — you cannot roll back what you never recorded
$before = Get-DatabaseAvailabilityGroupNetwork
$before | Format-List

# 3. Make the change (dry run first)
Set-DatabaseAvailabilityGroupNetwork -Identity <DatabaseAvailabilityGroupNetworkIdParameter> -WhatIf
Set-DatabaseAvailabilityGroupNetwork -Identity <DatabaseAvailabilityGroupNetworkIdParameter>

# 4. Verify and diff
$after = Get-DatabaseAvailabilityGroupNetwork
Compare-Object ($before | Out-String) ($after | Out-String)

Syntax

Set-DatabaseAvailabilityGroupNetwork [-Identity] <DatabaseAvailabilityGroupNetworkIdParameter>
 [-Confirm]
 [-Description <String>]
 [-DomainController <Fqdn>]
 [-IgnoreNetwork <Boolean>]
 [-Name <String>]
 [-ReplicationEnabled <Boolean>]
 [-Subnets <DatabaseAvailabilityGroupSubnetId[]>]
 [-WhatIf]
 [<CommonParameters>]

Parameters (9)

ParameterTypeRequiredWhat it controls
-Identity DatabaseAvailabilityGroupNetworkIdParameter yes The Identity parameter specifies the DAG network being configured.
-Confirm SwitchParameter The Confirm switch specifies whether to show or hide the confirmation prompt. How this switch affects the cmdlet depends on whether the cmdlet requires confirmation before proceeding.
-Description String The Description parameter specifies an optional description for the DAG network.
-DomainController Fqdn The DomainController parameter specifies the domain controller that's used by this cmdlet to read data from or write data to Active Directory. You identify the domain controller by its fully qualified domain name...
-IgnoreNetwork Boolean The IgnoreNetwork parameter indicates that the specified network should be ignored and not used by the DAG.
-Name String The Name parameter provides a name for the DAG network.
-ReplicationEnabled Boolean The ReplicationEnabled parameter specifies whether the network can be used for replication activity. If this parameter isn't specified, the default behavior is to enable the network for replication.
-Subnets DatabaseAvailabilityGroupSubnetId[] The Subnets parameter specifies one or more subnets that are associated with the DAG network.
-WhatIf SwitchParameter The WhatIf switch shows what the command does without making any changes. You don't need to specify a value with this switch.

Reference facts derived from Microsoft documentation, © Microsoft, licensed CC BY 4.0; restructured with original guidance by serv365.ai.