你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Start-AzVirtualNetworkGatewaySiteFailoverTest

在虚拟网络网关上为指定的对等互连位置启动故障转移模拟。

语法

Default (默认值)

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

说明

Start-AzVirtualNetworkGatewaySiteFailoverTest cmdlet 在虚拟网络网关上启动故障转移模拟,特别是针对给定 的 PeeringLocation。 这对于测试网关故障转移和确保网络复原能力非常有用。

可以指定故障转移测试 的类型 ,任一类型:

  • SingleSiteFailover:用于模拟单个站点的故障转移的测试。
  • MultiSiteFailover:用于模拟多个站点的故障转移的测试。

默认情况下,除非另有指定, SingleSiteFailover 否则将使用类型执行测试。 故障转移测试有助于确保虚拟网络网关能够正确处理故障转移,并主动识别任何问题。

示例

示例 1

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

此示例为对等互连位置 EastUS 的“test_rg”资源组中的虚拟网络网关“test_gateway”启动故障转移模拟。 默认情况下,将执行 SingleSiteFailover 测试。

示例 2

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

此示例为 EastUS 对等互连位置的“test_rg”资源组中的虚拟网络网关“test_gateway”启动故障转移模拟。 测试类型设置为 MultiSiteFailover,这意味着测试将模拟多个站点的故障转移。

参数

-Confirm

在运行 cmdlet 之前,提示你进行确认。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:cf

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-DefaultProfile

用于与 Azure 通信的凭据、帐户、租户和订阅。

参数属性

类型:IAzureContextContainer
默认值:None
支持通配符:False
不显示:False
别名:AzContext, AzureRmContext, AzureCredential

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-PeeringLocation

要为其运行测试的对等互连位置。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-ResourceGroupName

虚拟网络网关的资源组名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-Type

测试类型:SingleSiteFailover 或 MultiSiteFailover。

参数属性

类型:String
默认值:None
接受的值:SingleSiteFailover, MultiSiteFailover
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-VirtualNetworkGatewayName

虚拟网络网关的名称。

参数属性

类型:String
默认值:None
支持通配符:False
不显示:False

参数集

(All)
Position:Named
必需:True
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

-WhatIf

显示 cmdlet 运行时会发生什么情况。 命令脚本未运行。

参数属性

类型:SwitchParameter
默认值:None
支持通配符:False
不显示:False
别名:无线

参数集

(All)
Position:Named
必需:False
来自管道的值:False
来自管道的值(按属性名称):False
来自剩余参数的值:False

CommonParameters

此 cmdlet 支持通用参数:-Debug、-ErrorAction、-ErrorVariable、-InformationAction、-InformationVariable、-OutBuffer、-OutVariable、-PipelineVariable、-ProgressAction、-Verbose、-WarningAction 和 -WarningVariable。 有关详细信息,请参阅 about_CommonParameters

输入

None

输出

List<T>