Get-AzLocalNetworkGateway
Gets a Local Network Gateway
Syntax
Get-AzLocalNetworkGateway
[-Name <String>]
-ResourceGroupName <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Local Network Gateway is the object representing your VPN device On-Premises. The Get-AzLocalNetworkGateway cmdlet returns the object representing your on-prem gateway based on Name and Resource Group Name.
Examples
Example 1: Get a Local Network Gateway
Get-AzLocalNetworkGateway -Name myLocalGW1 -ResourceGroupName myRG
Name : myLocalGW1
ResourceGroupName : myRG
Location : eastus
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/M
icrosoft.Network/localNetworkGateways/myLocalGW1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
GatewayIpAddress : x.x.x.x
LocalNetworkAddressSpace : {
"AddressPrefixes": []
}
BgpSettings : null
Returns the object of the Local Network Gateway with the name "myLocalGW1" within the resource group "myRG"
Example 2: Get Local Network Gateways using filtering
Get-AzLocalNetworkGateway -Name myLocalGW* -ResourceGroupName myRG
Name : myLocalGW1
ResourceGroupName : myRG
Location : eastus
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/M
icrosoft.Network/localNetworkGateways/myLocalGW1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
GatewayIpAddress : x.x.x.x
LocalNetworkAddressSpace : {
"AddressPrefixes": []
}
BgpSettings : null
Name : myLocalGW2
ResourceGroupName : myRG
Location : eastus
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myRG/providers/M
icrosoft.Network/localNetworkGateways/myLocalGW2
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
GatewayIpAddress : x.x.x.x
LocalNetworkAddressSpace : {
"AddressPrefixes": []
}
BgpSettings : null
Returns the object of the Local Network Gateway with name starting with "myLocalGW" within the resource group "myRG"
Parameters
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with azure.
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Name
Type: | String |
Aliases: | ResourceName |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | True |
-ResourceGroupName
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | True |
Inputs
Outputs
Related Links
GitHub에서 Microsoft와 공동 작업
이 콘텐츠의 원본은 GitHub에서 찾을 수 있으며, 여기서 문제와 끌어오기 요청을 만들고 검토할 수도 있습니다. 자세한 내용은 참여자 가이드를 참조하세요.
Azure PowerShell