Add-AzVirtualNetworkGatewayIpConfig
Lägger till en IP-konfiguration till en virtuell nätverksgateway.
Syntax
Add-AzVirtualNetworkGatewayIpConfig
-VirtualNetworkGateway <PSVirtualNetworkGateway>
-Name <String>
[-PrivateIpAddress <String>]
[-SubnetId <String>]
[-PublicIpAddressId <String>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Add-AzVirtualNetworkGatewayIpConfig
-VirtualNetworkGateway <PSVirtualNetworkGateway>
-Name <String>
[-PrivateIpAddress <String>]
[-Subnet <PSSubnet>]
[-PublicIpAddress <PSPublicIpAddress>]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
Cmdleten Add-AzVirtualNetworkGatewayIpConfig lägger till en IP-konfiguration till en virtuell nätverksgateway.
Exempel
Exempel 1
Add-AzVirtualNetworkGatewayIpConfig -VirtualNetworkGateway $gw -Name GWIPConfig2 -Subnet $subnet -PublicIpAddress $gwpip2
Name : VNet7GW
ResourceGroupName : VPNGatewayV3
Location : eastus
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VPNGatewayV3/providers/Microsoft.Network/virtualNetworkGateways/VNet7GW
Etag : W/"d27a784f-3c3f-4150-863d-764649b6e8e7"
ResourceGuid : 3c2478a7-d5d4-4e80-8532-7ea2ad577598
ProvisioningState : Succeeded
Tags :
IpConfigurations : [
{
"PrivateIpAllocationMethod": "Dynamic",
"Subnet": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VPNGatewayV3/providers/Microsoft.Network/virtualNetworks/Vnet7/subnets/GatewaySubnet"
},
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VPNGatewayV3/providers/Microsoft.Network/publicIPAddresses/VNet7GW_IP"
},
"Name": "default",
"Etag": "W/\"d27a784f-3c3f-4150-863d-764649b6e8e7\"",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VPNGatewayV3/providers/Microsoft.Network/virtualNetworkGateways/VNet7GW/ipConfigurations/default"
},
{
"PrivateIpAllocationMethod": "Dynamic",
"PublicIpAddress": {
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/VPNGatewayV3/providers/Microsoft.Network/publicIPAddresses/delIPConfig"
},
"Name": "GWIPConfig2",
"Id": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/ResourceGroupNotSet/providers/Microsoft.Network/virtualNetworkGateways/VirtualNetworkGatewayNameNotSet/virtualNetworkGatewayIpConfiguration/GWIPConfig2"
}
]
GatewayType : Vpn
VpnType : RouteBased
EnableBgp : True
ActiveActive : False
GatewayDefaultSite : null
Sku : {
"Capacity": 2,
"Name": "VpnGw1",
"Tier": "VpnGw1"
}
VpnClientConfiguration : null
BgpSettings : {
"Asn": 65534,
"BgpPeeringAddress": "10.7.255.254",
"PeerWeight": 0
}
Parametrar
-Confirm
Uppmanar dig att bekräfta innan du kör cmdleten.
Typ: | SwitchParameter |
Alias: | cf |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-DefaultProfile
Autentiseringsuppgifter, konto, klientorganisation och prenumeration som används för kommunikation med Azure.
Typ: | IAzureContextContainer |
Alias: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Name
Anger namnet på den GATEWAY IP-konfiguration som ska läggas till.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-PrivateIpAddress
Anger den privata IP-adressen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-PublicIpAddress
Anger den offentliga IP-adressen.
Typ: | PSPublicIpAddress |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-PublicIpAddressId
Anger ID för den offentliga IP-adressen.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-Subnet
Anger ett PSSubnet- objekt.
Typ: | PSSubnet |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-SubnetId
Anger ID för undernätet.
Typ: | String |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
-VirtualNetworkGateway
Anger ett PSVirtualNetworkGateway- objekt. Den här cmdleten ändrar PSVirtualNetworkGateway- objekt som du anger. Du kan använda cmdleten Get-AzVirtualNetworkGateway för att hämta ett PSVirtualNetworkGateway- objekt.
Typ: | PSVirtualNetworkGateway |
Position: | Named |
Standardvärde: | None |
Obligatorisk: | True |
Godkänn pipeline-indata: | True |
Godkänn jokertecken: | False |
-WhatIf
Visar vad som skulle hända om cmdleten körs. Cmdleten körs inte.
Typ: | SwitchParameter |
Alias: | wi |
Position: | Named |
Standardvärde: | False |
Obligatorisk: | False |
Godkänn pipeline-indata: | False |
Godkänn jokertecken: | False |
Indata
Utdata
Relaterade länkar
Azure PowerShell