< Back

New-AzureRmLocalNetworkGateway

Tue Jan 29, 2019 9:56 pm

NAME New-AzureRmLocalNetworkGateway



SYNOPSIS

Creates a Local Network Gateway





SYNTAX

New-AzureRmLocalNetworkGateway [-AddressPrefix <System.Collections.Generic.List`1[System.String]>] [-AsJob] [-Asn <UInt32>] [-BgpPeeringAddress

<String>] [-DefaultProfile <IAzureContextContainer>] [-Force] [-GatewayIpAddress <String>] -Location <String> -Name <String> [-PeerWeight <Int32>]

-ResourceGroupName <String> [-Tag <Hashtable>] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The Local Network Gateway is the object representing your VPN device On-Premises.



The New-AzureRmLocalNetworkGateway cmdlet creates the object representing your on-prem gateway based on the Name, Resource Group Name, Location,

and IP Address of the gateway, as well as the Address Prefix of the On-Premises network which will be connecting to Azure.





PARAMETERS

-AddressPrefix <System.Collections.Generic.List`1[System.String]>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-AsJob [<SwitchParameter>]

Run cmdlet in the background



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Asn <UInt32>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-BgpPeeringAddress <String>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Force [<SwitchParameter>]

Forces the command to run without asking for user confirmation.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-GatewayIpAddress <String>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Location <String>





Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>





Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PeerWeight <Int32>





Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-ResourceGroupName <String>

Specifies the resource group that the local network gateway belongs to.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Tag <Hashtable>

Key-value pairs in the form of a hash table. For example:



@{key0="value0";key1=$null;key2="value2"}



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



<CommonParameters>

This cmdlet supports the common parameters: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

None

This cmdlet does not accept any input.





OUTPUTS

Microsoft.Azure.Commands.Network.Models.PSLocalNetworkGateway







NOTES









1: Create a Local Network Gateway



New-AzureRmLocalNetworkGateway -Name myLocalGW -ResourceGroupName myRG -Location "West US" -GatewayIpAddress 23.99.221.164 -AddressPrefix

"10.5.51.0/24"



Creates the object of the Local Network Gateway with the name "myLocalGW" within the resource group "myRG" in location "West US" with the IP

address "23.99.221.164" and the address prefix "10.5.51.0/24" on-prem.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... orkgateway

Get-AzureRmLocalNetworkGateway

Remove-AzureRmLocalNetworkGateway

Set-AzureRmLocalNetworkGateway