Edit

Share via


Start-AzEventHubNamespaceFailOver

Triggers EventHub Namespace Failover

Syntax

SetExpanded (Default)

Start-AzEventHubNamespaceFailOver
    -NamespaceName <String>
    -ResourceGroupName <String>
    [-SubscriptionId <String>]
    [-Force]
    [-PrimaryLocation <String>]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

SetViaIdentityExpanded

Start-AzEventHubNamespaceFailOver
    -InputObject <IEventHubIdentity>
    [-Force]
    [-DefaultProfile <PSObject>]
    [-AsJob]
    [-NoWait]
    [-Confirm]
    [-WhatIf]
    [<CommonParameters>]

Description

Triggers EventHub Namespace Failover

Examples

Example 1: Triggers EventHub Namespace Failover.

Start-AzEventHubNamespaceFailOver -ResourceGroupName myresourceGroup -NamespaceName mynamespace -PrimaryLocation mylocation
$eventhubNamespace = Get-AzEventHubNamespace -ResourceGroupName myresourceGroup -Name mynamespace
AlternateName                      :
ClusterArmId                       :
CreatedAt                          : 5/5/2025 5:16:45 PM
DisableLocalAuth                   : False
EnableAutoInflate                  : False
Id                                 : /subscriptions/subscriptionId/resourceGroups/myresourceGroup/providers/Microsoft.EventHub/namespaces/mynamespace
IdentityType                       :
KafkaEnabled                       : True
KeySource                          :
KeyVaultProperty                   :
Location                           : mylocation
MaxReplicationLagDurationInSeconds : 0
MaximumThroughputUnit              : 0
MetricId                           : subscriptionId:mynamespace
MinimumTlsVersion                  : 1.2
Name                               : mynamespace
PrincipalId                        :
PrivateEndpointConnection          :
ProvisioningState                  : Succeeded
PublicNetworkAccess                : Enabled
ReplicaLocation                    : {{
                                       "locationName": "mylocation",
                                       "roleType": "Primary",
                                       "replicaState": "Ready"
                                     }, {
                                       "locationName": "mylocation2",
                                       "roleType": "Secondary",
                                       "replicaState": "Ready"
                                     }}
RequireInfrastructureEncryption    :
ResourceGroupName                  : myresourceGroup
ServiceBusEndpoint                 : https://mynamespace.servicebus.windows.net:443/
SkuCapacity                        : 1
SkuName                            : Premium
SkuTier                            : Premium
Status                             : Active
SystemDataCreatedAt                :
SystemDataCreatedBy                :
SystemDataCreatedByType            :
SystemDataLastModifiedAt           :
SystemDataLastModifiedBy           :
SystemDataLastModifiedByType       :
Tag                                : {
                                     }
TenantId                           :
Type                               : Microsoft.EventHub/Namespaces
UpdatedAt                          : 5/5/2025 5:17:49 PM
UserAssignedIdentity               : {
                                     }
ZoneRedundant                      : False

Triggers EventHub Namespace Failover.

Parameters

-AsJob

Run the command as a job

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Parameter properties

Type:PSObject
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzureRMContext, AzureCredential

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Force

If Force is false, then graceful failover is attempted after ensuring no data loss. If Force flag is set to true, forced failover is attempted with possible data loss.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-InputObject

Identity parameter. To construct, see NOTES section for INPUTOBJECT properties and create a hash table.

Parameter properties

Type:IEventHubIdentity
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetViaIdentityExpanded
Position:Named
Mandatory:True
Value from pipeline:True
Value from pipeline by property name:False
Value from remaining arguments:False

-NamespaceName

The name of EventHub namespace

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-NoWait

Run the command asynchronously

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-PrimaryLocation

New primary location after failover.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ResourceGroupName

The name of the resource group. The name is case insensitive.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

SetExpanded
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-SubscriptionId

The ID of the target subscription.

Parameter properties

Type:String
Default value:(Get-AzContext).Subscription.Id
Supports wildcards:False
DontShow:False

Parameter sets

SetExpanded
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

IEventHubIdentity

Outputs

IFailOver