Get-AzLoadBalancer
Gets a load balancer.
Syntax
Get-AzLoadBalancer
[-ResourceGroupName <String>]
[-Name <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzLoadBalancer
-ResourceGroupName <String>
-Name <String>
-ExpandResource <String>
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Description
The Get-AzLoadBalancer cmdlet gets one or more Azure load balancers that are contained in a resource group.
Examples
Example 1: Get a load balancer
Get-AzLoadBalancer -Name "MyLoadBalancer1" -ResourceGroupName "MyResourceGroup"
Name : MyLoadBalancer1
ResourceGroupName : MyResourceGroup
Location : australiaeast
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/M
icrosoft.Network/loadBalancers/MyLoadBalancer1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
FrontendIpConfigurations : []
BackendAddressPools : []
LoadBalancingRules : []
Probes : []
InboundNatRules : []
InboundNatPools : []
Sku : {
"Name": "Basic",
"Tier": "Regional"
}
This command gets the load balancer named MyLoadBalancer. A load balancer must exist before you can run this cmdlet.
Example 2: List load balancers using filtering
Get-AzLoadBalancer -Name MyLoadBalancer*
Name : MyLoadBalancer1
ResourceGroupName : MyResourceGroup
Location : australiaeast
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/M
icrosoft.Network/loadBalancers/MyLoadBalancer1
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
FrontendIpConfigurations : []
BackendAddressPools : []
LoadBalancingRules : []
Probes : []
InboundNatRules : []
InboundNatPools : []
Sku : {
"Name": "Basic",
"Tier": "Regional"
}
Name : MyLoadBalancer2
ResourceGroupName : MyResourceGroup
Location : australiaeast
Id : /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/MyResourceGroup/providers/M
icrosoft.Network/loadBalancers/MyLoadBalancer2
Etag : W/"00000000-0000-0000-0000-000000000000"
ResourceGuid : 00000000-0000-0000-0000-000000000000
ProvisioningState : Succeeded
Tags :
FrontendIpConfigurations : []
BackendAddressPools : []
LoadBalancingRules : []
Probes : []
InboundNatRules : []
InboundNatPools : []
Sku : {
"Name": "Basic",
"Tier": "Regional"
}
This command gets all load balancers with a name that starts with "MyLoadBalancer"
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 |
-ExpandResource
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Type: | String |
Aliases: | ResourceName |
Position: | Named |
Default value: | None |
Required: | True |
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