Set-AzureRmLocalNetworkGateway
Modifies a local network gateway.
Warning
The AzureRM PowerShell module has been officially deprecated as of February 29, 2024. Users are advised to migrate from AzureRM to the Az PowerShell module to ensure continued support and updates.
Although the AzureRM module may still function, it's no longer maintained or supported, placing any continued use at the user's discretion and risk. Please refer to our migration resources for guidance on transitioning to the Az module.
Syntax
Set-AzureRmLocalNetworkGateway
-LocalNetworkGateway <PSLocalNetworkGateway>
[-AddressPrefix <System.Collections.Generic.List`1[System.String]>]
[-Asn <UInt32>]
[-BgpPeeringAddress <String>]
[-PeerWeight <Int32>]
[-AsJob]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Set-AzureRmLocalNetworkGateway cmdlet modifies a local network gateway.
Examples
Example 1
Set configuration for an existing gateway
$lgw = Get-AzureRmLocalNetworkGateway -Name myLocalGW -ResourceGroupName myRG
Set-AzureRmLocalNetworkGateway -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
Type: | List<T>[String] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-AsJob
Run cmdlet in the background
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Asn
Type: | UInt32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-BgpPeeringAddress
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalNetworkGateway
Type: | PSLocalNetworkGateway |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-PeerWeight
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Inputs
Parameters: LocalNetworkGateway (ByValue)
List<T>[[System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]]