Set-AzVirtualNetworkGateway
Sanal ağ geçidi Güncelleştirmeler.
Syntax
Set-AzVirtualNetworkGateway
-VirtualNetworkGateway <PSVirtualNetworkGateway>
[-GatewaySku <String>]
[-GatewayDefaultSite <PSLocalNetworkGateway>]
[-VpnClientAddressPool <String[]>]
[-VpnClientProtocol <String[]>]
[-VpnAuthenticationType <String[]>]
[-VpnClientRootCertificates <PSVpnClientRootCertificate[]>]
[-VpnClientRevokedCertificates <PSVpnClientRevokedCertificate[]>]
[-VpnClientIpsecPolicy <PSIpsecPolicy[]>]
[-Asn <UInt32>]
[-PeerWeight <Int32>]
[-MinScaleUnit <Int32>]
[-MaxScaleUnit <Int32>]
[-IpConfigurationBgpPeeringAddresses <PSIpConfigurationBgpPeeringAddress[]>]
[-EnableActiveActiveFeature]
[-EnablePrivateIpAddress <Boolean>]
[-DisableActiveActiveFeature]
[-RadiusServerAddress <String>]
[-RadiusServerSecret <SecureString>]
[-RadiusServerList <PSRadiusServer[]>]
[-AadTenantUri <String>]
[-AadAudienceId <String>]
[-AadIssuerUri <String>]
[-RemoveAadAuthentication]
[-CustomRoute <String[]>]
[-NatRule <PSVirtualNetworkGatewayNatRule[]>]
[-BgpRouteTranslationForNat <Boolean>]
[-VirtualNetworkGatewayPolicyGroup <PSVirtualNetworkGatewayPolicyGroup[]>]
[-ClientConnectionConfiguration <PSClientConnectionConfiguration[]>]
[-AdminState <String>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Set-AzVirtualNetworkGateway
-VirtualNetworkGateway <PSVirtualNetworkGateway>
[-GatewaySku <String>]
[-GatewayDefaultSite <PSLocalNetworkGateway>]
[-VpnClientAddressPool <String[]>]
[-VpnClientProtocol <String[]>]
[-VpnAuthenticationType <String[]>]
[-VpnClientRootCertificates <PSVpnClientRootCertificate[]>]
[-VpnClientRevokedCertificates <PSVpnClientRevokedCertificate[]>]
[-VpnClientIpsecPolicy <PSIpsecPolicy[]>]
[-Asn <UInt32>]
[-PeerWeight <Int32>]
[-IpConfigurationBgpPeeringAddresses <PSIpConfigurationBgpPeeringAddress[]>]
[-EnableActiveActiveFeature]
[-EnablePrivateIpAddress <Boolean>]
[-DisableActiveActiveFeature]
[-RadiusServerAddress <String>]
[-RadiusServerSecret <SecureString>]
[-RadiusServerList <PSRadiusServer[]>]
[-AadTenantUri <String>]
[-AadAudienceId <String>]
[-AadIssuerUri <String>]
[-RemoveAadAuthentication]
[-CustomRoute <String[]>]
[-NatRule <PSVirtualNetworkGatewayNatRule[]>]
[-BgpRouteTranslationForNat <Boolean>]
[-VirtualNetworkGatewayPolicyGroup <PSVirtualNetworkGatewayPolicyGroup[]>]
[-ClientConnectionConfiguration <PSClientConnectionConfiguration[]>]
-Tag <Hashtable>
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Set-AzVirtualNetworkGateway cmdlet'i bir sanal ağ geçidini güncelleştirir.
Örnekler
Örnek 1: Sanal ağ geçidinin ASN'sini güncelleştirme
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -Asn 1337
İlk komut ResourceGroup001 kaynak grubuna ait Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, $Gateway değişkeninde depolanan sanal ağ geçidini güncelleştirir. Komut ayrıca ASN'yi 1337 olarak ayarlar.
Örnek 2: Sanal ağ geçidine IPsec ilkesi ekleme
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
$vpnclientipsecpolicy = New-AzVpnClientIpsecPolicy -IpsecEncryption AES256 -IpsecIntegrity SHA256 -SALifeTime 86472 -SADataSize 429497 -IkeEncryption AES256 -IkeIntegrity SHA256 -DhGroup DHGroup2 -PfsGroup None
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientIpsecPolicy $vpnclientipsecpolicy
İlk komut, ResourceGroup001 kaynak grubuna ait olan Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, belirtilen ipsec parametrelerine göre Vpn ipsec ilke nesnesini oluşturur. Üçüncü komut, değişken $Gateway depolanan sanal ağ geçidini güncelleştirir. Komutu ayrıca Sanal ağ geçidindeki $vpnclientipsecpolicy nesnesinde belirtilen özel vpn ipsec ilkesini ayarlar.
Örnek 3: Mevcut bir sanal ağ geçidine Etiket Ekleme/Güncelleştirme
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -Tag @{ testtagKey="SomeTagKey"; testtagValue="SomeKeyValue" }
Name : Gateway001
ResourceGroupName : ResourceGroup001
Location : westus
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
Name Value
============ ============
testtagValue SomeKeyValue
testtagKey SomeTagKey
IpConfigurations : [
{
"PrivateIpAllocationMethod": "Dynamic",
"Subnet": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/GatewaySubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/publicIPAddresses/Gateway001Ip"
},
"Name": "vng1ipConfig",
"Etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/Gateway001IpConfig"
}
]
GatewayType : Vpn
VpnType : RouteBased
EnableBgp : False
ActiveActive : False
GatewayDefaultSite : null
Sku : {
"Capacity": 2,
"Name": "VpnGw1",
"Tier": "VpnGw1"
}
VpnClientConfiguration : null
BgpSettings : {
"Asn": 65515,
"BgpPeeringAddress": "1.2.3.4",
"PeerWeight": 0
}
İlk komut ResourceGroup001 kaynak grubuna ait Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, sanal ağ geçidi Gateway01'i @{ testtagKey="SomeTagKey"; testtagValue="SomeKeyValue" } etiketleriyle güncelleştirir.
Örnek 4: Mevcut bir sanal ağ geçidinin VpnClient için AAD kimlik doğrulama yapılandırmasını ekleme/güncelleştirme
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -AadTenantUri "https://login.microsoftonline.com/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4" -AadIssuerUri "https://sts.windows.net/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4/" -AadAudienceId "a21fce82-76af-45e6-8583-a08cb3b956f9"
Name : Gateway001
ResourceGroupName : ResourceGroup001
Location : westus
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
Name Value
============ ============
testtagValue SomeKeyValue
testtagKey SomeTagKey
IpConfigurations : [
{
"PrivateIpAllocationMethod": "Dynamic",
"Subnet": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworks/MyVnet/subnets/GatewaySubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/publicIPAddresses/Gateway001Ip"
},
"Name": "vng1ipConfig",
"Etag": "W/\"00000000-0000-0000-0000-000000000000\"",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/Gateway001IpConfig"
}
]
GatewayType : Vpn
VpnType : RouteBased
EnableBgp : False
ActiveActive : False
GatewayDefaultSite : null
Sku : {
"Capacity": 2,
"Name": "VpnGw1",
"Tier": "VpnGw1"
}
vpnClientConfiguration : {
"vpnClientProtocols": [
"OpenVPN"
],
"vpnClientAddressPool": {
"addressPrefixes": [
"101.10.0.0/16"
]
},
"vpnClientRootCertificates": "",
"vpnClientRevokedCertificates": "",
"radiusServerAddress": "",
"radiusServerSecret": "",
"aadTenantUri": "https://login.microsoftonline.com/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4\",
"aadAudienceId": "a21fce82-76af-45e6-8583-a08cb3b956g9\",
"aadIssuerUri": "https://sts.windows.net/0ab2c4f4-81e6-44cc-a0b2-b3a47a1443f4/\"
},
BgpSettings : {
"Asn": 65515,
"BgpPeeringAddress": "1.2.3.4",
"PeerWeight": 0
}
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientRootCertificates $rootCert -RemoveAadAuthentication
İlk komut ResourceGroup001 kaynak grubuna ait Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, sanal ağ geçidi Gateway01'i AAD kimlik doğrulama yapılandırmaları params:aadTenantUri, aadAudienceId, vpnClient için aadIssuerUri ile güncelleştirir. Üçüncü komut, sanal ağ geçidinin VpnClient'ından AAD kimlik doğrulama yapılandırmasını kaldırır.
Örnek 5: Mevcut bir sanal ağ geçidine IpConfigurationBgpPeeringAddresses Ekleme/Güncelleştirme
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
$ipconfigurationId1 = '/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default'
$addresslist1 = @('169.254.21.25')
$gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -IpConfigurationBgpPeeringAddresses $gw1ipconfBgp1
Name : Gateway001
ResourceGroupName : ResourceGroup001
Location : westcentralus
Id : /subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001
Etag : W/"a08f13d3-6106-44e0-9127-e35e6f9793d5"
ResourceGuid : 30993429-a1ed-42ca-9862-9156b013626e
ProvisioningState : Succeeded
Tags :
IpConfigurations : [
{
"PrivateIpAllocationMethod": "Dynamic",
"Subnet": {
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworks/newApipaNet/subnets/GatewaySubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/publicIPAddresses/newapipaip"
},
"Name": "default",
"Etag": "W/\"a08f13d3-6106-44e0-9127-e35e6f9793d5\"",
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default"
}
]
GatewayType : Vpn
VpnType : RouteBased
EnableBgp : False
ActiveActive : False
GatewayDefaultSite : null
Sku : {
"Capacity": 2,
"Name": "VpnGw1",
"Tier": "VpnGw1"
}
VpnClientConfiguration : null
BgpSettings : {
"Asn": 65515,
"BgpPeeringAddress": "10.1.255.30",
"PeerWeight": 0,
"BgpPeeringAddresses": [
{
"IpconfigurationId": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default",
"DefaultBgpIpAddresses": [
"10.1.255.30"
],
"CustomBgpIpAddresses": [
"169.254.21.55"
],
"TunnelIpAddresses": [
"13.78.146.151"
]
}
]
}
İlk komut ResourceGroup001 kaynak grubuna ait Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, sanal ağ geçidi Gateway01 IpConfiguration Id değerini ipconfigurationId1 değişkenine atar. Üçüncü komut, adres listesini adres listesine1 atar. Dördüncü komut bir PSIpConfigurationBgpPeeringAddress nesnesi oluşturdu. Beşinci komut bu yeni oluşturulan PSIpConfigurationBgpPeeringAddress değerini IpConfigurationBgpPeeringAddresses olarak ayarlayıp ağ geçidini güncelleştirdi.
Örnek 6: CustomAddress'i mevcut ipconfigurationBgpPeeringAddresses sanal ağ geçidine güncelleştirme/kaldırma
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
$ipconfigurationId1 = '/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default'
$addresslist1 = @()
$gw1ipconfBgp1 = New-AzIpConfigurationBgpPeeringAddressObject -IpConfigurationId $ipconfigurationId1 -CustomAddress $addresslist1
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -IpConfigurationBgpPeeringAddresses $gw1ipconfBgp1
Name : Gateway001
ResourceGroupName : ResourceGroup001
Location : westcentralus
Id : /subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001
Etag : W/"a08f13d3-6106-44e0-9127-e35e6f9793d5"
ResourceGuid : 30993429-a1ed-42ca-9862-9156b013626e
ProvisioningState : Succeeded
Tags :
IpConfigurations : [
{
"PrivateIpAllocationMethod": "Dynamic",
"Subnet": {
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworks/newApipaNet/subnets/GatewaySubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/publicIPAddresses/newapipaip"
},
"Name": "default",
"Etag": "W/\"a08f13d3-6106-44e0-9127-e35e6f9793d5\"",
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default"
}
]
GatewayType : Vpn
VpnType : RouteBased
EnableBgp : False
ActiveActive : False
GatewayDefaultSite : null
Sku : {
"Capacity": 2,
"Name": "VpnGw1",
"Tier": "VpnGw1"
}
VpnClientConfiguration : null
BgpSettings : {
"Asn": 65515,
"BgpPeeringAddress": "10.1.255.30",
"PeerWeight": 0,
"BgpPeeringAddresses": [
{
"IpconfigurationId": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default",
"DefaultBgpIpAddresses": [
"10.1.255.30"
],
"CustomBgpIpAddresses": [],
"TunnelIpAddresses": [
"13.78.146.151"
]
}
]
}
İlk komut ResourceGroup001 kaynak grubuna ait Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, sanal ağ geçidi Gateway01 IpConfiguration Id değerini ipconfigurationId1 değişkenine atar. Üçüncü komut, adres listesini adres listesine1 atar. Dördüncü komut bir PSIpConfigurationBgpPeeringAddress nesnesi oluşturdu. Beşinci komut bu yeni oluşturulan PSIpConfigurationBgpPeeringAddress değerini IpConfigurationBgpPeeringAddresses olarak ayarlayıp ağ geçidini güncelleştirdi.
Örnek 7: Mevcut bir sanal ağ geçidine NatRules ekleme/güncelleştirme
$Gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
$vngNatRules = $Gateway.NatRules
$natRule = New-AzVirtualNetworkGatewayNatRule -Name "natRule1" -Type "Static" -Mode "IngressSnat" -InternalMapping @("25.0.0.0/16") -ExternalMapping @("30.0.0.0/16")
$vngNatRules.Add($natrule)
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -NatRule $vngNatRules.NatRules -BgpRouteTranslationForNat $true
Name : Gateway001
ResourceGroupName : ResourceGroup001
Location : westcentralus
Id : /subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001
Etag : W/"a08f13d3-6106-44e0-9127-e35e6f9793d5"
ResourceGuid : 30993429-a1ed-42ca-9862-9156b013626e
ProvisioningState : Succeeded
Tags :
IpConfigurations : [
{
"PrivateIpAllocationMethod": "Dynamic",
"Subnet": {
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworks/newApipaNet/subnets/GatewaySubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/publicIPAddresses/newapipaip"
},
"Name": "default",
"Etag": "W/\"a08f13d3-6106-44e0-9127-e35e6f9793d5\"",
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default"
}
]
GatewayType : Vpn
VpnType : RouteBased
EnableBgp : False
ActiveActive : False
GatewayDefaultSite : null
Sku : {
"Capacity": 2,
"Name": "VpnGw1",
"Tier": "VpnGw1"
}
VpnClientConfiguration : null
BgpSettings : {
"Asn": 65515,
"BgpPeeringAddress": "10.1.255.30",
"PeerWeight": 0,
"BgpPeeringAddresses": [
{
"IpconfigurationId": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/ipConfigurations/default",
"DefaultBgpIpAddresses": [
"10.1.255.30"
],
"CustomBgpIpAddresses": [
"169.254.21.55"
],
"TunnelIpAddresses": [
"13.78.146.151"
]
}
]
}
NatRules : [
{
"VirtualNetworkGatewayNatRulePropertiesType": "Static",
"Mode": "IngressSnat",
"InternalMappings": [
{
"AddressSpace": "25.0.0.0/16"
}
],
"ExternalMappings": [
{
"AddressSpace": "30.0.0.0/16"
}
],
"ProvisioningState": "Succeeded",
"Name": "natRule1",
"Etag": "W/\"5150d788-e165-42ba-99c4-8138a545fce9\"",
"Id": "/subscriptions/59ac12a6-f2b7-46d4-af3d-98ba9d9dbd92/resourceGroups/ResourceGroup001/providers/Microsoft.Network/virtualNetworkGateways/Gateway001/natRules/natRule1"
}
]
EnableBgpRouteTranslationForNat : True
İlk komut, ResourceGroup001 kaynak grubuna ait Olan Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut, vngNatRules değişkenine mevcut natrule'ları atar. Üçüncü komut, yeni oluşturulan PSVirtualNetworkGatewayNatRule nesnesinin natrule değerini natRule değişkenine atar. Dördüncü komut bu PSVirtualNetworkGatewayNatRule nesnesini vngNatRules listesine ekler. Beşinci komut, bu yeni oluşturulan PSVirtualNetworkGatewayNatRule'ı ağ geçidinin NatRules'una ayarlayıp ağ geçidini güncelleştirdi.
Örnek 8: Mevcut bir sanal ağ geçidinin süresi dolmuş birden çok VpnClientRootCertificates silin
$Gateway=Get-AzVirtualNetworkGateway -ResourceGroupName "ResourceGroup001" -Name "Gateway001"
$rootCerts=$Gateway.VpnClientConfiguration.VpnClientRootCertificates
$rootCerts.Count
$rootCerts[0]
$rootCerts[1]
$rootCerts.Remove($rootCerts[1])
$Gateway1 = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $Gateway -VpnClientRootCertificates $rootCerts
İlk komut ResourceGroup001 kaynak grubuna ait Olan Gateway01 adlı bir sanal ağ geçidi alır ve bunu $Gateway adlı değişkene depolar İkinci komut VirtualNetworkGateway üzerindeki tüm kök sertifikaları alır ve $rootCerts başka bir değişkene kaydeder Üçüncü komut VirtualNetworkGateway'de toplam mevcut kök sertifikaları gösterir. İlerideki ve beşinci komutlar, müşterinin hangilerini silmek istediğini görmesi için ilgili dizinlerde kök sertifikaları yazdırır. Altıncı komut, bu dizini kullanarak süresi dolan kök sertifikayı kaldırır; örneğin, burada 1. Birden çok süresi dolmuş sertifikayı değişkenden kaldırmak için aynı adımları yineleyin: $rootCerts Yedinci komut VirtualNetworkGateway'i, değişkende bulunan geçerli kök sertifikaları (örneğin, değişkende var olan sertifikalar) ayarlamak için güncelleştirir: $rootCerts
Örnek 9: ExpressRoute sanal ağ geçidini, Sanal Wan ağlarındaki diğer ExpressRoute sanal ağ geçitleriyle ExpressRoute üzerinden iletişime izin verecek şekilde yapılandırın.
# Option 1 - Retrieve the gateway object, modify the property and save the changes.
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
$gateway.AllowVirtualWanTraffic = $true
$gateway = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway
# Option 2 - Use the cmdlet switch
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway -AllowVirtualWanTraffic $true
Her iki durumda da ilk komut ağ geçidini alır. Ardından özelliği doğrudan nesne üzerinde değiştirebilir ve kalıcı hale gelebilir veya Set-AzVirtualNetworkGateway cmdlet'indeki anahtarı kullanabilirsiniz.
Örnek 10: ExpressRoute sanal ağ geçidini, Sanal Wan ağlarındaki diğer ExpressRoute sanal ağ geçitleriyle ExpressRoute üzerinden iletişimi engelleyecek şekilde yapılandırın.
# Option 1 - Retrieve the gateway object, modify the property and save the changes.
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
$gateway.AllowVirtualWanTraffic = $false
$gateway = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway
# Option 2 - Use the cmdlet switch
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway -AllowVirtualWanTraffic $false
Her iki durumda da ilk komut ağ geçidini alır. Ardından özelliği doğrudan nesne üzerinde değiştirebilir ve kalıcı hale gelebilir veya Set-AzVirtualNetworkGateway cmdlet'indeki anahtarı kullanabilirsiniz.
Örnek 11: ExpressRoute sanal ağ geçidini, diğer sanal ağlardaki diğer ExpressRoute sanal ağ geçitleriyle ExpressRoute üzerinden iletişime izin verecek şekilde yapılandırın.
# Option 1 - Retrieve the gateway object, modify the property and save the changes.
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
$gateway.AllowRemoteVnetTraffic = $true
$gateway = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway
# Option 2 - Use the cmdlet switch
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway -AllowRemoteVnetTraffic $true
Her iki durumda da ilk komut ağ geçidini alır. Ardından özelliği doğrudan nesne üzerinde değiştirebilir ve kalıcı hale gelebilir veya Set-AzVirtualNetworkGateway cmdlet'indeki anahtarı kullanabilirsiniz.
Örnek 12: ExpressRoute sanal ağ geçidini, diğer sanal ağ geçitlerindeki diğer sanal ağ geçitleriyle ExpressRoute üzerinden iletişimi engelleyecek şekilde yapılandırın.
# Option 1 - Retrieve the gateway object, modify the property and save the changes.
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
$gateway.AllowRemoteVnetTraffic = $false
$gateway = Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway
# Option 2 - Use the cmdlet switch
$gateway = Get-AzVirtualNetworkGateway -ResourceGroupName "resourceGroup001" -Name "gateway001"
Set-AzVirtualNetworkGateway -VirtualNetworkGateway $gateway -AllowRemoteVnetTraffic $false
Her iki durumda da ilk komut ağ geçidini alır. Ardından özelliği doğrudan nesne üzerinde değiştirebilir ve kalıcı hale gelebilir veya Set-AzVirtualNetworkGateway cmdlet'indeki anahtarı kullanabilirsiniz.
Parametreler
-AadAudienceId
P2S AAD kimlik doğrulama seçeneği:AadAudienceId.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AadIssuerUri
P2S AAD kimlik doğrulama seçeneği:AadIssuerUri.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AadTenantUri
P2S AAD kimlik doğrulama seçeneği:AadTenantUri.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-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
IPsec tünelleri içinde BGP oturumlarını ayarlamak için kullanılan sanal ağ geçidinin ASN'si
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BgpRouteTranslationForNat
Bu, bu VirtualNetworkGateway üzerinde BgpRouteTranslationForNat'ı etkinleştirir ve devre dışı bırakır
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ClientConnectionConfiguration
Adres ve ilke grubu arasında ilişkilendiren P2S İstemcisi Bağlan ion Yapılandırması
Type: | PSClientConnectionConfiguration[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-CustomRoute
Müşteri tarafından belirtilen özel yollar AddressPool
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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 |
-DisableActiveActiveFeature
Sanal ağ geçidinde Etkin Etkin özelliğini devre dışı bırakmak için bayrak ekleme
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnableActiveActiveFeature
Sanal ağ geçidinde Etkin Etkin özelliğini etkinleştirmek için bayrak ekleme
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-EnablePrivateIpAddress
Sanal ağ geçidinde Etkin Etkin özelliğini etkinleştirmek için bayrak ekleme
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-GatewayDefaultSite
Zorlamalı tünel için kullanılacak varsayılan site. Varsayılan bir site belirtilirse, ağ geçidinin sanal ağından gelen tüm İnternet trafiği bu siteye yönlendirilir.
Type: | PSLocalNetworkGateway |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-GatewaySku
Sanal ağ geçidinin SKU'su
Type: | String |
Accepted values: | Basic, Standard, HighPerformance, UltraPerformance, VpnGw1, VpnGw2, VpnGw3, VpnGw4, VpnGw5, VpnGw1AZ, VpnGw2AZ, VpnGw3AZ, VpnGw4AZ, VpnGw5AZ, ErGw1AZ, ErGw2AZ, ErGw3AZ |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-IpConfigurationBgpPeeringAddresses
Sanal ağ geçidi bgpsettings için BgpPeeringAddresses.
Type: | PSIpConfigurationBgpPeeringAddress[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-NatRule
Sanal ağ geçidi için NatRules.
Type: | PSVirtualNetworkGatewayNatRule[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PeerWeight
Bu sanal ağ geçidinden BGP üzerinden öğrenilen rotalara eklenen ağırlık
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RadiusServerAddress
P2S Dış Radius sunucu adresi.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RadiusServerList
P2S birden çok dış Radius sunucusu.
Type: | PSRadiusServer[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RadiusServerSecret
P2S Dış Radius sunucu gizli dizisi.
Type: | SecureString |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-RemoveAadAuthentication
Sanal ağ geçidinden P2S istemcisi için AAD kimlik doğrulamasını kaldırma bayrağı.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Tag
P2S Dış Radius sunucu adresi.
Type: | Hashtable |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-VirtualNetworkGateway
Değişikliklerini temel alan sanal ağ geçidi nesnesi. Bu, Get-AzVirtualNetworkGateway kullanılarak alınabilir
Type: | PSVirtualNetworkGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VirtualNetworkGatewayPolicyGroup
P2S ilke grubu bu ağ geçidine eklendi
Type: | PSVirtualNetworkGatewayPolicyGroup[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnAuthenticationType
P2S VPN istemcisi kimlik doğrulama türlerinin listesi.
Type: | String[] |
Accepted values: | Certificate, Radius, AAD |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnClientAddressPool
VPN istemcisi IP adreslerinin ayrılacak adres alanı. Bu, sanal ağ veya şirket içi aralıklarla çakışmamalıdır.
Type: | String[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnClientIpsecPolicy
P2S VPN istemci tünel protokolleri için IPSec ilkelerinin listesi.
Type: | PSIpsecPolicy[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnClientProtocol
P2S VPN istemci tünel protokollerinin listesi
Type: | String[] |
Accepted values: | SSTP, IkeV2, OpenVPN |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnClientRevokedCertificates
İptal edilen VPN istemci sertifikalarının listesi. Bunlardan biriyle eşleşen bir sertifika sunan bir VPN istemcisinin gitmesi istenir.
Type: | PSVpnClientRevokedCertificate[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-VpnClientRootCertificates
VPN istemcisi kimlik doğrulaması için kullanılacak VPN istemcisi kök sertifikalarının listesi. VPN istemcilerini Bağlan, bu kök sertifikalardan birinden oluşturulan sertifikaları sunmalıdır.
Type: | PSVpnClientRootCertificate[] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
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
String[]
PSVpnClientRevokedCertificate[]
PSIpConfigurationBgpPeeringAddress[]
PSVirtualNetworkGatewayNatRule[]
Çıkış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