Edit

Share via


Start-AzVirtualNetworkGatewaySiteFailoverTest

Starts a failover simulation on the virtual network gateway for the specified peering location.

Syntax

Default (Default)

Start-AzVirtualNetworkGatewaySiteFailoverTest
    -ResourceGroupName <String>
    -VirtualNetworkGatewayName <String>
    -PeeringLocation <String>
    [-Type <String>]
    [-DefaultProfile <IAzureContextContainer>]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Start-AzVirtualNetworkGatewaySiteFailoverTest cmdlet initiates a failover simulation on the virtual network gateway, specifically for the given PeeringLocation. This is useful for testing the gateway's ability to failover and ensure network resiliency.

You can specify the Type of the failover test, either:

  • SingleSiteFailover: A test to simulate a failover for a single site.
  • MultiSiteFailover: A test to simulate a failover for multiple sites.

By default, the test will be performed using the SingleSiteFailover type unless specified otherwise. The failover test helps ensure that the virtual network gateway can handle failovers correctly and that any issues are identified proactively.

Examples

Example 1

Start-AzVirtualNetworkGatewaySiteFailoverTest -ResourceGroupName "test_rg" -VirtualNetworkGatewayName "test_gateway" -PeeringLocation "EastUS"

This example starts a failover simulation for the virtual network gateway "test_gateway" in the "test_rg" resource group for the peering location EastUS. By default, a SingleSiteFailover test will be performed.

Example 2

Start-AzVirtualNetworkGatewaySiteFailoverTest -ResourceGroupName "test_rg" -VirtualNetworkGatewayName "test_gateway" -PeeringLocation "EastUS" -Type "MultiSiteFailover"

This example starts a failover simulation for the virtual network gateway "test_gateway" in the "test_rg" resource group for the EastUS peering location. The test type is set to MultiSiteFailover, meaning the test will simulate failover for multiple sites.

Parameters

-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:IAzureContextContainer
Default value:None
Supports wildcards:False
DontShow:False
Aliases:AzContext, 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

-PeeringLocation

Peering location to run the test for.

Parameter properties

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

Parameter sets

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

-ResourceGroupName

The resource group name of the virtual network gateway.

Parameter properties

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

Parameter sets

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

-Type

Test type: SingleSiteFailover or MultiSiteFailover.

Parameter properties

Type:String
Default value:None
Accepted values:SingleSiteFailover, MultiSiteFailover
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

-VirtualNetworkGatewayName

The name of the virtual network gateway.

Parameter properties

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

Parameter sets

(All)
Position:Named
Mandatory:True
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

None

Outputs

List<T>