Set-AzLocalNetworkGateway
Modifies a local network gateway.
Syntax
Default (Default)
Set-AzLocalNetworkGateway
-LocalNetworkGateway <PSLocalNetworkGateway>
[-AddressPrefix <String[]>]
[-Asn <UInt32>]
[-BgpPeeringAddress <String>]
[-PeerWeight <Int32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzLocalNetworkGateway cmdlet modifies a local network gateway.
Examples
Example 1
Set configuration for an existing gateway
$lgw = Get-AzLocalNetworkGateway -Name myLocalGW -ResourceGroupName myRG
Set-AzLocalNetworkGateway -LocalNetworkGateway $lgw
Name : myLocalGW
ResourceGroupName : TestRG1
Location : westus
Id : /subscriptions/81ab786c-56eb-4a4d-bb5f-f60329772466/resourceGroups/TestRG1/providers/Microso
ft.Network/localNetworkGateways/myLocalGW
Etag : W/"d2de6968-315e-411d-a4b8-a8c335abe61b"
ResourceGuid : 393acf8b-dbb8-4b08-a9ea-c714570710e1
ProvisioningState : Succeeded
Tags :
GatewayIpAddress : 1.2.3.4
LocalNetworkAddressSpace : {
"AddressPrefixes": []
}
BgpSettings : null
Parameters
-AddressPrefix
The Set-AzLocalNetworkGateway cmdlet modifies a local network gateway.
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
-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
-Asn
The Set-AzLocalNetworkGateway cmdlet modifies a local network gateway.
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: True
Value from remaining arguments: False
-BgpPeeringAddress
The Set-AzLocalNetworkGateway cmdlet modifies a local network gateway.
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
-LocalNetworkGateway
The Set-AzLocalNetworkGateway cmdlet modifies a local network gateway.
Parameter properties
Parameter sets
(All)
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-PeerWeight
The Set-AzLocalNetworkGateway cmdlet modifies a local network gateway.
Parameter properties
Type: Int32
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
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 .
Outputs