Update-AzVpnGateway
Ölçeklenebilir bir VPN ağ geçidi Güncelleştirmeler.
Syntax
Update-AzVpnGateway
-ResourceGroupName <String>
-Name <String>
[-VpnConnection <PSVpnConnection[]>]
[-VpnGatewayNatRule <PSVpnGatewayNatRule[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-BgpPeeringAddress <PSIpConfigurationBgpPeeringAddress[]>]
[-EnableBgpRouteTranslationForNat <Boolean>]
[-Tag <Hashtable>]
[-Asn <UInt32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnGateway
-InputObject <PSVpnGateway>
[-VpnConnection <PSVpnConnection[]>]
[-VpnGatewayNatRule <PSVpnGatewayNatRule[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-BgpPeeringAddress <PSIpConfigurationBgpPeeringAddress[]>]
[-EnableBgpRouteTranslationForNat <Boolean>]
[-Tag <Hashtable>]
[-Asn <UInt32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Update-AzVpnGateway
-ResourceId <String>
[-VpnConnection <PSVpnConnection[]>]
[-VpnGatewayNatRule <PSVpnGatewayNatRule[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-BgpPeeringAddress <PSIpConfigurationBgpPeeringAddress[]>]
[-EnableBgpRouteTranslationForNat <Boolean>]
[-Tag <Hashtable>]
[-Asn <UInt32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Update-AzVpnGateway cmdlet'i ölçeklenebilir bir VPN ağ geçidini güncelleştirir.
Azure VPN ağ geçidi, VirtualHub içindeki siteden siteye bağlantılar için yazılım tanımlı bir bağlantıdır. Bu ağ geçidi, kullanıcı tarafından belirtilen ölçek birimine göre yeniden boyutlandırılıp ölçeklendirilir. VPN sitesi olarak bilinen bir daldan/siteden ölçeklenebilir ağ geçidine bağlantı ayarlanabilir. Her bağlantı 2 Etkin-Etkin tünelden oluşur
Örnekler
Örnek 1
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
$vpnGateway = New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2
Update-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VpnGatewayScaleUnit 3
ResourceGroupName : testRG
Name : testvpngw
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/vpnGateways/testvpngw
Location : West US
VpnGatewayScaleUnit : 3
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/Ali_pS_Test/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/vpnGateways
ProvisioningState : Succeeded
Yukarıdakiler, Azure'daki "testRG" kaynak grubunda Batı ABD'de Sanal WAN, Sanal Ağ, Sanal Merkez adlı bir kaynak grubu oluşturur. Bundan sonra Sanal Hub'da 2 ölçek birimiyle bir VPN ağ geçidi oluşturulur.
Ağ geçidi oluşturulduktan sonra, ağ geçidini 3 ölçek birimine yükseltmek için Update-AzVpnGateway kullanır.
Örnek 2
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
$vpnGateway = New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2
$ipconfigurationId1 = 'Instance0'
$addresslist1 = @('169.254.21.5')
$gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1
$ipconfigurationId2 = 'Instance1'
$addresslist2 = @('169.254.21.10')
$gw1ipconfBgp2 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId2 -CustomAddress $addresslist2
$gw = Get-AzVpnGateway -ResourceGroupName testRg -Name testgw
Update-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -BgpPeeringAddress @($gw1ipconfBgp1,$gw1ipconfBgp2)
ResourceGroupName : testRG
Name : testvpngw
Id : /subscriptions/{subscriptionId}/resourceGroups/testRG/providers/Microsoft.Network/vpnGateways/testvpngw
Location : West US
VpnGatewayScaleUnit : 3
VirtualHub : /subscriptions/{subscriptionId}/resourceGroups/Ali_pS_Test/providers/Microsoft.Network/virtualHubs/westushub
BgpSettings : {}
Type : Microsoft.Network/vpnGateways
ProvisioningState : Succeeded
Yukarıdakiler, Azure'daki "testRG" kaynak grubunda Batı ABD'de Sanal WAN, Sanal Ağ, Sanal Merkez adlı bir kaynak grubu oluşturur. Bundan sonra Sanal Hub'da 2 ölçek birimiyle bir VPN ağ geçidi oluşturulur.
Ağ geçidi oluşturulduktan sonra, BgpPeeringAddress'i güncelleştirmek için Set-AzVpnGateway kullanır.
Örnek 3
$gw = Get-AzVpnGateway -ResourceGroupName "testRg" -Name "testgw"
$gw.BgpSettings.BgpPeeringAddresses
$gw.BgpSettings.BgpPeeringAddresses[0].CustomBgpIpAddresses=$null
$gw.BgpSettings.BgpPeeringAddresses[1].CustomBgpIpAddresses=$null
$gw.BgpSettings.BgpPeeringAddresses
Update-AzVpnGateway -InputObject $gw
Yukarıdaki örnek, Sanal WAN VPN Gateway'i varsayılan BgpPeeringAddress kullanacak şekilde güncelleştirir.
Örnek 4
New-AzResourceGroup -Location "West US" -Name "testRG"
$virtualWan = New-AzVirtualWan -ResourceGroupName testRG -Name myVirtualWAN -Location "West US"
$virtualHub = New-AzVirtualHub -VirtualWan $virtualWan -ResourceGroupName "testRG" -Name "westushub" -AddressPrefix "10.0.0.1/24"
$vpnGateway = New-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -VirtualHubId $virtualHub.Id -VpnGatewayScaleUnit 2
$ipconfigurationId1 = 'Instance0'
$addresslist1 = @()
$gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1
$ipconfigurationId2 = 'Instance1'
$addresslist2 = @()
$gw1ipconfBgp2 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId2 -CustomAddress $addresslist2
$gw = Get-AzVpnGateway -ResourceGroupName testRg -Name testgw
Update-AzVpnGateway -ResourceGroupName "testRG" -Name "testvpngw" -BgpPeeringAddress @($gw1ipconfBgp1,$gw1ipconfBgp2)
Yukarıdaki örnek, Sanal WAN VPN Gateway'i varsayılan BgpPeeringAddress kullanacak şekilde güncelleştirir.
BgpPeeringAddress'i güncelleştirmek için Update-AzVpnGateway kullanır
Parametreler
-AsJob
Cmdlet'i arka planda çalıştırma
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Asn
VPN üzerinden BGP için vpn gateway ASN'sinin
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-BgpPeeringAddress
Bu VpnGateway bgpsettings için BGP eşleme adresleri.
Type: | PSIpConfigurationBgpPeeringAddress[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Confirm
Cmdlet'i çalıştırmadan önce sizden onay ister.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Azure ile iletişim için kullanılan kimlik bilgileri, hesap, kiracı ve abonelik.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableBgpRouteTranslationForNat
Bu VpnGateway'de NAT için Bgp yol çevirisini etkinleştirmek/devre dışı bırakmak için bayrak ekleyin.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Değiştirilecek vpn gateway nesnesi
Type: | PSVpnGateway |
Aliases: | VpnGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Vpn ağ geçidi adı.
Type: | String |
Aliases: | ResourceName, VpnGatewayName, GatewayName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Kaynak grubu adı.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceId
Değiştirilecek VpnGateway'in Azure kaynak kimliği.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tag
Kaynak etiketlerini temsil eden bir karma tablo.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnConnection
Bu VpnGateway'in sahip olması gereken Vpn Bağlan ions listesi.
Type: | PSVpnConnection[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnGatewayNatRule
Bu VpnGateway ile ilişkili VpnGatewayNatRules listesi.
Type: | PSVpnGatewayNatRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VpnGatewayScaleUnit
Bu VpnGateway için ölçek birimi.
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Cmdlet çalıştırılıyorsa ne olacağını gösterir. Cmdlet çalıştırılmaz.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Girişler
Çıkışlar
İlişkili Bağlantılar
Azure PowerShell
Geri Bildirim
https://aka.ms/ContentUserFeedback.
Çok yakında: 2024 boyunca, içerik için geri bildirim mekanizması olarak GitHub Sorunları’nı kullanımdan kaldıracak ve yeni bir geri bildirim sistemiyle değiştireceğiz. Daha fazla bilgi için bkz.Gönderin ve geri bildirimi görüntüleyin