Update-AzP2sVpnGateway
Update an existing P2SVpnGateway under VirtualHub for point to site connectivity.
Syntax
ByP2SVpnGatewayNameNoVpnServerConfigurationUpdate (Default)
Update-AzP2sVpnGateway
-ResourceGroupName <String>
-Name <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayNameByVpnServerConfigurationObject
Update-AzP2sVpnGateway
-ResourceGroupName <String>
-Name <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnServerConfiguration <PSVpnServerConfiguration>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Update-AzP2sVpnGateway
-ResourceGroupName <String>
-Name <String>
-VpnServerConfigurationId <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayObjectNoVpnServerConfigurationUpdate
Update-AzP2sVpnGateway
-InputObject <PSP2SVpnGateway>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayObjectByVpnServerConfigurationObject
Update-AzP2sVpnGateway
-InputObject <PSP2SVpnGateway>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnServerConfiguration <PSVpnServerConfiguration>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayObjectByVpnServerConfigurationResourceId
Update-AzP2sVpnGateway
-InputObject <PSP2SVpnGateway>
-VpnServerConfigurationId <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayResourceIdNoVpnServerConfigurationUpdate
Update-AzP2sVpnGateway
-ResourceId <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayResourceIdByVpnServerConfigurationObject
Update-AzP2sVpnGateway
-ResourceId <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnServerConfiguration <PSVpnServerConfiguration>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
ByP2SVpnGatewayResourceIdByVpnServerConfigurationResourceId
Update-AzP2sVpnGateway
-ResourceId <String>
-VpnServerConfigurationId <String>
[-VpnClientAddressPool <String[]>]
[-P2SConnectionConfiguration <PSP2SConnectionConfiguration[]>]
[-VpnGatewayScaleUnit <UInt32>]
[-CustomDnsServer <String[]>]
[-RoutingConfiguration <PSRoutingConfiguration>]
[-EnableInternetSecurityFlag]
[-DisableInternetSecurityFlag]
[-Tag <Hashtable>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Update-AzP2sVpnGateway cmdlet enables you to update an existing P2SVpnGateway under VirtualHub with new VpnClientAddressPool or new VpnServerConfiguration or change of VpnGatewayScaleUnit.
Examples
Example 1
$vpnClientAddressSpaces = New-Object string[] 1
$vpnClientAddressSpaces[0] = "101.10.0.0/16"
Update-AzP2sVpnGateway -ResourceGroupName P2SCortexGATesting -Name 683482ade8564515aed4b8448c9757ea-westus-gw -VpnClientAddressPool $vpnClientAddressSpaces -EnableInternetSecurityFlag
ResourceGroupName : P2SCortexGATesting
Name : 683482ade8564515aed4b8448c9757ea-westus-gw
Id : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482ade8564515a
ed4b8448c9757ea-westus-gw
Location : westus
VpnGatewayScaleUnit : 1
VirtualHub : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/NilamdWestUsVirtualH
ub
VpnServerConfiguration : /subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/vpnServerConfigurations/NilamdWe
stUsConfig
VpnServerConfigurationLocation :
VpnClientConnectionHealth : null
Type : Microsoft.Network/p2sVpnGateways
ProvisioningState : Succeeded
P2SConnectionConfigurations : [
{
"ProvisioningState": "Succeeded",
"VpnClientAddressPool": {
"AddressPrefixes": [
"101.10.0.0/16"
]
},
"EnableInternetSecurity": True,
"RoutingConfiguration": {
"AssociatedRouteTable": {
"Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/WestUsVirtualHub/hubRouteTables/defaultRouteTable"
}
"PropagatedRouteTables": {
"Labels": [],
"Ids": [
{
"Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/virtualHubs/WestUsVirtualHub/hubRouteTables/defaultRouteTable"
}
]
},
"VnetRoutes": {
"StaticRoutes": []
}
},
"Name": "P2SConnectionConfigDefault",
"Etag": "W/\"d7debc2f-ccbb-4f00-bddc-42c99b52fda3\"",
"Id": "/subscriptions/b1f1deed-af60-4bab-9223-65d340462e24/resourceGroups/P2SCortexGATesting/providers/Microsoft.Network/p2sVpnGateways/683482
ade8564515aed4b8448c9757ea-westus-gw/p2sConnectionConfigurations/P2SConnectionConfigDefault"
}
]
The Update-AzP2sVpnGateway cmdlet enables you to update an existing P2SVpnGateway under VirtualHub with new VpnClientAddressPool. When Point to site client connects with this P2SVpnGateway, one of the ip address from this VpnClientAddressPool gets allocated to that client.
Example 2
Update an existing P2SVpnGateway under VirtualHub for point to site connectivity. (autogenerated)
Update-AzP2sVpnGateway -AsJob -Name 00000000-0000-0000-0000-00000000000000000-westus-gw -ResourceGroupName P2SCortexGATesting -VpnClientAddressPool <String[]> -VpnGatewayScaleUnit 1 -VpnServerConfiguration <PSVpnServerConfiguration>
Parameters
-AsJob
Run cmdlet in the background
Parameter properties
Type: SwitchParameter
Default value: None
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
-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
-CustomDnsServer
The list of Custom Dns Servers.
Parameter properties
Type: String [ ]
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: True
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
-DisableInternetSecurityFlag
Disable internet security flag for this P2SVpnGateway connections
Parameter properties
Type: SwitchParameter
Default value: None
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
-EnableInternetSecurityFlag
Enable internet security flag for this P2SVpnGateway connections
Parameter properties
Type: SwitchParameter
Default value: None
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
The p2s vpn gateway object to be modified
Type: PSP2SVpnGateway
Default value: None
Supports wildcards: False
DontShow: False
Aliases: P2SVpnGateway
ByP2SVpnGatewayObjectNoVpnServerConfigurationUpdate
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayObjectByVpnServerConfigurationObject
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayObjectByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-Name
The P2S vpn gateway name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Aliases: ResourceName, P2SVpnGatewayName, GatewayName
Parameter sets
ByP2SVpnGatewayNameNoVpnServerConfigurationUpdate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayNameByVpnServerConfigurationObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-P2SConnectionConfiguration
The list of P2SConnectionConfigurations that this P2SVpnGateway needs to have.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByP2SVpnGatewayNameNoVpnServerConfigurationUpdate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayNameByVpnServerConfigurationObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The Azure resource ID of the P2SVpnGateway to be modified.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByP2SVpnGatewayResourceIdNoVpnServerConfigurationUpdate
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationObject
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
-RoutingConfiguration
Routing configuration for this connection
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Tag
A hashtable which represents resource tags.
Parameter properties
Type: Hashtable
Default value: None
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
-VpnClientAddressPool
P2S VpnClient AddressPool for this P2SVpnGateway P2SConnectionConfiguration.
Parameter properties
Type: String [ ]
Default value: None
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
-VpnGatewayScaleUnit
The scale unit for this P2SVpnGateway.
Parameter properties
Type: UInt32
Default value: None
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
-VpnServerConfiguration
The VpnServerConfiguration to be attached to this P2SVpnGateway.
Parameter properties
Parameter sets
ByP2SVpnGatewayNameByVpnServerConfigurationObject
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayObjectByVpnServerConfigurationObject
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationObject
Position: Named
Mandatory: False
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-VpnServerConfigurationId
The id of Vpn server configuration object this P2SVpnGateway will be attached to.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ByP2SVpnGatewayNameByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByP2SVpnGatewayObjectByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
Value from remaining arguments: False
ByP2SVpnGatewayResourceIdByVpnServerConfigurationResourceId
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: True
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 .
System.String
Microsoft.Azure.Commands.Network.Models.PSVpnServerConfiguration
Outputs